I would personally say yes but a local physics expert might disagree ![]()
random stuff
Part-based Particles? Iāve always been curious on how otherās implementation of those is done, may I get to know yours?
Sure but it isnāt optimized
local tweenService = game:GetService(āTweenServiceā)
local main = script.Parent
local orb = main.Orb
local button = main.Button
local debounce = false
local tweenInfo = TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false)
local tweenInfo2 = TweenInfo.new(1,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false)
local function transparency(part)
task.spawn(function()
task.wait(0.1)
local target = 1
local tweenGoal = {Transparency = target}
local tween = tweenService:Create(part,tweenInfo, tweenGoal)
tween:Play()
game.Debris:AddItem(part,1)
end)
end
local function color(part)
local target = Color3.fromRGB(0, 0, 0)
local tweenGoal = {Color = target}
local tween = tweenService:Create(part,tweenInfo2,tweenGoal)
tween:Play()
end
local function size(part)
task.spawn(function()
task.wait(0.03)
local target = Vector3.new(5,5,5)
local tweenGoal = {Size = target}
local tween = tweenService:Create(part,tweenInfo,tweenGoal)
tween:Play()
end)
end
local function move(part)
local target = part.CFrame + Vector3.new(0,0,15)
local tweenGoal = {CFrame = target}
local tween = tweenService:Create(part ,tweenInfo ,tweenGoal)
tween:Play()
end
local function flameSpew()
local part = Instance.new("Part", workspace)
part.Size = Vector3.new(0.5,0.5,0.5)
part.Anchored = true
part.CFrame = orb.CFrame
part.Material = "Neon"
part.BrickColor = BrickColor.new("Neon orange")
part.CanCollide = false
move(part)
size(part)
color(part)
transparency(part)
end
button.Touched:Connect(function()
if debounce then return end
debounce = true
button.BrickColor = BrickColor.new("Black")
print("Flame Spew")
for i = 1, 10, 1 do
flameSpew()
task.wait(0.1)
end
task.wait(1)
button.BrickColor = BrickColor.new("Cocoa")
debounce = false
end)
try white+black
A tip for a case in which:
task.spawn(function()
task.wait(Time)
...
end)
You can instead do:
task.delay(Time, function()
...
end)
Iām not sure how this works but wouldnāt this delay the entire script? I used task.Spawn to avoid that.
assuming this one does the function after the wait
The task.delay works functionally identical to task.spawn.
Itās task.wait() that causes the script to yield, as instead of creating a new thread, it stops the current thread, that is why it stops the whole script if you use it outside of task.spawn/defer, as the current thread would be the main thread.
task.delay is just this in a nutshell:
It creates a new thread, and then uses task.wait to yield for Time seconds in that new thread.
If youāre curious on the task library, hereās the documentation page:
https://create.roblox.com/docs/reference/engine/libraries/task
Alright, thanks for the tip Iāll check it out. I appreciate the advice
Tested the script with the change, works perfectly
ts REEKS of those low quality ā_ simulatorā games
Yeah itās way too easy to make these lol, most of them are just base mesh parts slightly altered
