Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I get this to destroy the part in a local script?

1 answer

✓ Accepted answer

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)

2 comments

0

Wow dude, thanks! I did not know that! Of course I'll accept your answer!

0

No problem!

This discussion is preserved as it was. New answers, comments, and votes are closed.