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

Can you put trails in players hands?

I'm adding trails in my game that are on your hands but every time I use this script it goes into the humanoidrootpart! Can anyone help?

Here's my code!

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		local trail = game.ReplicatedStorage.RightHandTrail:Clone()
		local trail2 = game.ReplicatedStorage.LeftHandTrail:Clone()
		trail.Parent = char.RightHand
		trail2.Parent = char.LeftHand
		local attachment0 = Instance.new("Attachment",char.RightHand)
		attachment0.Name = "TrailAttachment0"
		local attachment1 = Instance.new("Attachment",char.LeftHand)
		attachment1.Name = "TrailAttachment1"
		trail.Attachment0 = attachment0
		trail.Attachment1 = attachment1
	end)
end)

2 comments

0

You just used 2 attachments in total, one in the left hand and one in the right. This causes the trail to go from hand to hand trough the rootpart.

0

Oh but what should I do to fix it?

1 answer

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		local RH = char.RightHand
		local LH = char.LeftHand
		
		local RT = Instance.new("Trail")
		RT.Parent = RightHand
		local RA = Instance.new("Attachment")
		RA.Parent = RightHand
		RA.Position = Vector3.new(0,-1,0)

		RT.Attachment1 = RightHand.RightWristRigAttachment
		RT.Attachment2 = RA

		local LT = Instance.new("Trail")
		LT.Parent = LeftHand
		local LA = Instance.new("Attachment")
		LA.Parent = LeftHand
		LA.Position = Vector3.new(0,-1,0)

		LT.Attachment1 = LeftHand.LeftWristRigAttachment
		LT.Attachment2 = LA

	end)
end)

2 comments

0

Didn't work

0

Oof, just Change the variable name to "RightHand" and "LeftHand" instead of "RH" and "RL"

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