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 get the right hand, It says index nil?

My script below says: ServerScriptService.ParticleScript:5: attempt to index nil with 'RightHand'

game.Players.PlayerAdded:Connect(function(plr)
	local char = plr.Character
	local particle = Instance.new("ParticleEmitter")
	particle.Enabled = false
	particle.Parent = char.RightHand
end)

1 answer

✓ Accepted answer

The problem most likely is the fact that the character hasn't loaded, so you should do :

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
    local particle = Instance.new("ParticleEmitter")
    particle.Enabled = false
    particle.Parent = char.RightHand
    end)
end)

2 comments

0

Let me test

0

Ur answer worked but now I have more problems rip

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