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 4 years ago

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

1local part = script.Parent
2 
3part.Touched:Connect(function(hit)
4    local moveable = hit.Parent:FindFirstChild("173")
5    if (moveable~=nil) then
6        hit.Parent.Humanoid.WalkSpeed = 1
7 
8    end
9end)

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 — 4y
0
did u see that local moveable? i put random name skeletonpiratejack 13 — 4y
0
its been days i need help please skeletonpiratejack 13 — 4y

Answer this question