Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I am making a Tycoon and Need help making a Delete OnTouch script, can you help?

Asked by 9 years ago

I am making a tycoon and I need help on a simple script, but yet a Novice at scripting. I have the tycoon starters that drop the money bricks but I need help on a script that makes them disappear after a bit or go away when they touch the ground. I need help to make this script because I dont want a game lagging out because so much of the bricks are on the ground. Please help me if you can! :)

1
Roblox wiki. EzraNehemiah_TF2 3552 — 9y
0
Where is it on the wiki? TixyScripter 115 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago
time = (time you want it to wait before disappearing in seconds)

Part.Touch:connect(function(hit)
    if(hit.Name=="BasePlate") then Part:Destroy() end
)

while wait(1) do
    time = time - 1
    if(time==0) then Part:Destroy() end
end
Ad

Answer this question