can someone help me with a script that deletes a object after 5 seconds if its clicked.
Okay you clearly know nothing about ROBLOX Lua, and didn't attempt to solve this yourself.
BUT HEY I feel nice today.
script.Parent.MouseMouseButton1Click:Connect(function() wait(5) YourObjectNameHere:Destroy() end
put this script inside the object you want to destroy() clickdetector
You Can use ClickDetectors for that. Right Click the Object you want to be deleted within 5 seconds (in the Explorer) Hover your mouse to [Insert Object] Insert an [ClickDetector] into the Object
Now insert a Script into the Object Write this Code on the Script:
local Object = script.Parent local ClickDetector = Object:WaitForChild('ClickDetector') ClickDetector.MouseClick:Connect(function(Player) --You won't use "Player", its optional. ClickDetector:Destroy() --Removes the ClickDetector, so it can't be clicked Again wait(5) --How Many Seconds before the Object gets Removed? Object:Destroy() --Remove the Object end)
Instead of CTRL+C and CTRL+V, Study how the Code works and experiment it!