I tried making a freeze script for my game but it won't work. Here's my code.
function onJoined(newPlayer) newPlayer.Character.Humanoid.WalkSpeed = 0 end game.Players.PlayerAdded:connect(onJoined)
While making a script and putting it into Studio and testing it. The player still can walk.
you can anchor the primary part (HumanoidRootPart)
function onJoined(newPlayer) newPlayer.Character.PrimaryPart.Anchored=true end game.Players.PlayerAdded:connect(onJoined)
make sure its a server script
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:FindFirstChild("Humanoid") end) while true do if humanoid.RigType == Enum.HumanoidRigType.R6 then character.Torso.Anchored = true humanoid.Died:Connect(function() wait() player:LoadCharacter() end) end
Please tell me if I’m wrong because I’m on mobile and cannot test the script
I think THIS is what you're looking for:
wait() pcall(function() game:GetService("StarterGui"):SetCore("ResetButtonCallback", false) -- Player can't reset end)
After this, you can anchor the HumanoidRootPart
and the player will be stuck. Evil, but this is what you could do.