Hello, I want to make a block that disables player movement.
How would I go about this?
Thanks
Hello, I want to make a block that disables player movement.
How would I go about this?
Thanks
Inside the the part, add in a Script and type this
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
local humanoid = player.Character:WaitForChild("Humanoid")
humanoid.WalkSpeed = 0
-- add "humanoid.JumpPower = 0" if you want the player not to have jump height too.
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Do you know how to implement this into a local script also?
@Helloimpets LocalScript usually wouldn't work because it would only apply to the client and not the entire server. I may be wrong though.