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

If I wanted to spawn an object on a players arm when they joined how would I do that?

the script I used doesn’t work properly

game.Players.PlayerAdded:Connect(function(player)	
	player.CharacterAdded:Connect(function(character)
		local rightarm = character:WaitForChild("RightArm")
		local ticket = game.ReplicatedStorage.Spawn:Clone()
		ticket.Parent = character
		ticket.Orientation = rightarm.Orientation
		ticket.band.WeldConstraint.Part0 = rightarm
		ticket.band.WeldConstraint.Part1 = ticket.band	
		ticket.LeftArm:Remove()	
		ticket.band.SurfaceGui.Frame.Size.X = player:WaitForChild("Tickets").Value	
	end)
end

1 answer

✓ Accepted answer
game.Players.PlayerAdded:Connect(function(player)   
local character = player.character or player.CharacterAdded:Wait()
local part = Instance.new("Part",workspace)
local weld = Instance.new("Weld",character.RightHand)
weld.Part0 = character.RightHand
weld.Part1 = part
end)

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