Toxicator1

Stun/Disable Movement

Jan 8th, 2021
847
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. -- Disable character from moving by overriding movement command every frame
  2. -- Taken from: https://developer.roblox.com/en-us/api-reference/function/Humanoid/Move
  3. game:GetService("RunService"):BindToRenderStep("stun",
  4.     Enum.RenderPriority.Character.Value + 1,
  5.     function()
  6.         if localPlayer.Character then
  7.             local humanoid = localPlayer.Character:FindFirstChild("Humanoid")
  8.             if humanoid then
  9.                 humanoid:Move(Vector3.new(0,0,0))
  10.             end
  11.         end
  12.     end
  13. )
Advertisement
Add Comment
Please, Sign In to add comment