all this is is a local script with the following code in;
script.Parent.Touched:Connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then script.Parent:Destroy() end end)
Hey!
The reason as to why your script isn't working is because you are using a LocalScript
in Workspace
. A localscript cannot function in workspace to destroy a part. Put it in StarterCharacterScripts Instead.
You will need to change the code, and this is how you would do it:
local NowEnteringPart = workspace.NowEntering -- NOTE! If you change where the part is located, make sure to change this as well! NowEnteringPart.Touched:Connect(function(hit) NowEnteringPart:Destroy() end)