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

Part Properties and Player help?

I want to make so if someone touches it and has a certain name the part's can collide propertie will be false. Is this script good? ( Can't test it since I'm on the phone )

x = script.Parent
x.Touched:connect(function (Part)
	if Part.Parent:FindFirstChild("Humanoid") ~= nil then
		if Part.Parent.Name == "brokenrares"
			x.CanCollide = false
				wait(3)
			x.CanCollide = true 

1 answer

✓ Accepted answer

Try this

x = script.Parent
x.Touched:connect(function(Part)
    if Part.Parent:FindFirstChild("Humanoid") and Part.Parent.Name == "brokenrares" then --This doesn't work in solo mode because in solo your name is Player1
            x.CanCollide = false
                wait(3)
            x.CanCollide = true 

2 comments

0

Tell me if it works when you get on your computer.

0

Them tabs.

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