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

Anchor all players?

I've seen in games anchor all players I've been trying to figure out how to anchor all players?

1 answer

✓ Accepted answer
function AnchorPlayers()
	local players = game.Players:GetPlayers()
	
	for _, v in pairs(players) do
		if v.Character then v.Character.Torso.Anchored = true end
	end
end

AnchorPlayers()

So, we start a function called AnchorPlayers. Then we make a variable that stores a table of the players. We then go through that table of players and check if each player has a character model. If they do, anchor the torsos. Then we just end all the scopes and call the function.

1 comment

1

Thank you :)

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