Hello there, I was wondering how I could make a part stay visible for 10 seconds, and then it gets destroyed or hidden.
Use the Debris service and set it to destroy after ten seconds
Debris:AddItem(part, 10)
4 Likes
Do
Wait(10)
Part.transparancy = 1
Or
Wait(10)
Part:Destroy()
1 Like
Hope this helps
while true do
(path to part, for example, script.Parent.Part).transparency=0
(path to part, for example, script.Parent.Part).CanCollide=true
wait(10)
(path to part, for example, script.Parent.Part).Transparency=1
(path to part, for example, script.Parent.Part).CanCollide=false
end
1 Like
Sorry lua was getting confused, I should have put those notes as comments. Not doing so caused it to be colored weirdly.
Edit: Do you want it to loop or just happen once?
1 Like
In Script you should write this:
wait(10)
script.Parent:Destroy()
It may not work so tou should try this too:
wait(10)
script.Parent.Parent["Type The Part Name Here - Type The Part Name In This Quote Marks"]:Destroy()