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

how would i reference the player torso?

local torso = game.Players.LocalPlayer.Character:WaitForChild("Torso") this wont work

1 comment

0

I tested it and it worked. What is the script?

1 answer

✓ Accepted answer

Hello, I am assuming you are using a Local Script. Here's how I would've done it:

--R6
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local torso = character.UpperTorso or character.Torso

If you are using a Server Script then I guess you can use this since LocalPlayer is only for Local Scripts;

game.Players.PlayerAdded:Connect(function(player)
	local character = player.Character or player.CharacterAdded:Wait()
	local torso = character.UpperTorso or character.Torso
end)

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