im trying to make a block dissapear forever on the server when a player touches it. ive looked at a lot of different video tutorials and none of them worked. this is my code:
function onTouched(playerWhoTouched) wait(.3) script.Parent.Transparency=1 script.Parent.CanCollide=false
end
thanks from poopypigeon245
I may be wrong because I am a beginner.
You haven't defined what is being touched to call the function.
The way I would do it.
script.Parent.Touched:connect(function() wait(3) script.Parent:Destroy() end)
:Destroy() is a much better thing to use for what you're trying to do.
script.Parent.Touched:connect(function() script.Parent:Remove() end)
You should use a more simple function e.g
script.Parent.Touched:connect(function() end)
And try learn the basics of scripting.