Still have questions? Join our Discord server and get real time help.
0

# How do I freeze a player when joined in R6?

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



While making a script and putting it into Studio and testing it. The player still can walk.

0
really? it should do what it is suposed to do nothing is wrong starmaq 834 — 6mo
0
What exactly are you trying to do? Freeze R6 players or fix the script you have given us? You're giving an XY problem. incapaxx 3479 — 6mo

1
Edited 6 months ago

you can anchor the primary part (HumanoidRootPart)

function onJoined(newPlayer)
newPlayer.Character.PrimaryPart.Anchored=true
end



make sure its a server script

0
yah do this starmaq 834 — 6mo
0
There is still a problem. They can reset. incapaxx 3479 — 6mo
0
then disable the reset button. I don't remember how to do it but its possible ADUPS 5 — 6mo
0
But if you change the script a little bit and put it into starter character scripts that will work Miniller 364 — 6mo
0
Edited 6 months ago
game.Players.PlayerAdded:Connect(function(player)
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()
end)
end


Please tell me if I’m wrong because I’m on mobile and cannot test the script

0
BashCaster 2324
6 months ago

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.

0
The script must be local AND in StarterPlayerScripts BashCaster 2324 — 6mo