Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Anchored player script doesn't work?

Hi! I'm looking for anchored player script [R15] and I tried a lot of them but it doesn't work :( I want to freeze player when he join the game for 5 seconds then can move. thanks.

2 comments

1

Just anchor the character's LowerTorso/Torso or HumanoidRootPart... and we aren't here to give you scripts, we're here to help you fix them.

0

We can't just script things here for you! You have to learn this on your own and come back if you have any questions.

2 answers

game.Players.PlayerAdded:Connect(function(Player) -- Connect is deprecated
	Player.CharacterAdded:Connect(function(character) -- CharacterAdded Event
		Player.PlayerScripts.ControlScript.Disabled = true
		local humanoid = character:WaitForChild("Humanoid")
		if humanoid.RigType == Enum.HumanoidRigType.R15 then -- RigType is a property of Humanoid, not the Character
			humanoid.PlatformStand = true -- this is much easier than anchoring parts of the character, if you needed to anchor them though just do "character.UpperTorso.Anchored = true"
  		end
	end)
end)

Thank you guys for quick reply this my doesn't work script:

game.Players.PlayerAdded:connect(function(newPlayer)
local Player = game.Players.LocalPlayer
    Player.PlayerScripts.ControlScript.Disabled = true
        if Player.Character.RigType == 'R15' then
        Player.Character.LowerTorso.Anchored = true
        Player.Character.UpperTorso.Anchored = true
    end
end)

4 comments

0

Do you know how it works?

1

If I was know? Why did I come to ask you !!!

0

dude, newPlayer IS Player

0

instead of line 4 being .RigType try if player.Character:FindFirstChild("LowerTorso") then

This discussion is preserved as it was. New answers, comments, and votes are closed.