Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Part Properties and Player help?

Asked by 9 years ago

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

Log in to vote
0
Answered by
yoshiegg6 176
9 years ago

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 
0
Tell me if it works when you get on your computer. yoshiegg6 176 — 9y
0
Them tabs. Redbullusa 1580 — 9y
Ad

Answer this question