hey everyone, can someone help me out with this code? why doesnt it work?
local player = game.Players.LocalPlayer
local char = player.Character
local rS = char.Torso("Right Shoulder")
print(rS)
hey everyone, can someone help me out with this code? why doesnt it work?
local player = game.Players.LocalPlayer
local char = player.Character
local rS = char.Torso("Right Shoulder")
print(rS)
You're likely getting this error because the character hasn't loaded in before the code is run. Try this:
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local rS = char.Torso("Right Shoulder")
print(rS)
Use WaitForChild or square brackets for that.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
local rS = char.Torso:WaitForChild('Right Shoulder')?thank you!
Np.