i just a script that make the player unmovable when he gets health < 30 here is the script:(note the script is on StarterPlayerScripts) its a script like: a player will hit another player, then the player will stop moving (freeze or something like that) cuz its life will be less than 30 why it wont works?
local player = script.parent
local gui = game.Lighting.ControlScript
local humanoid = script.parent.parent.Character:FindFirstChild("Humanoid")
if humanoid.Health < 30 then
if player:FindFirstChild("ControlScript")then
while humanoid.Health < 30 do
player:FindFirstChild("ControlScript"):remove()
end
end
elseif not player.PlayerScripts:FindFirstChild("ControlScript")then
gui:Clone().Parent = player
end
i've already tried with walkspeed = 0 and anchoring player torso and head but the player can still move why??

1 comment
Anchor a body part of a player.