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

Player touches npc script?

Asked by 3 years ago

Hi I am making an SCP game and I am scripting a script for SCP 173

local part = script.Parent

part.Touched:Connect(function(hit)
    local moveable = hit.Parent:FindFirstChild("173")
    if (moveable~=nil) then
        hit.Parent.Humanoid.WalkSpeed = 1

    end
end)

I wanna make it like whenever the humanoid that has a script named "173" touched the part that I welded to the player's "HumanoidRootPart" it will be frozen. However, it didn't work. Help appreciated!

0
what does if (moveable~=nil) then mean? try if moveable~=nil then marsdonh 36 — 3y
0
did u see that local moveable? i put random name skeletonpiratejack 13 — 3y
0
its been days i need help please skeletonpiratejack 13 — 3y

Answer this question