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

Trail effect not working and no idea why. Pls help?

I have no idea why it's not working, all of it seems to be working but it's just not. Here is the script:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
	local trail = game.ServerStorage.Trail:Clone()
	trail.Parent = char.LeftUpperLeg
	local attachment0 = Instance.new("Attachment",char.LeftUpperLeg)
	print("Hi")
	attachment0.Name = "TrailAttachment0"
	local attachment1 = Instance.new("Attachment",char.LeftFoot)
	attachment1.Name = "TrailAttachment1"
	trail.Attachment0 = attachment0
	trail.Attachment1 = attachment1
	end)
end)

It seems that all of it is correct, but for some reason when I check my character when I test the game, it doesn't even seem to be making trail's parent to the LeftUpperLeg. It only works if I set it's parent to the Head. I want to make a trail that starts from your LeftUpperLeg until your LeftFoot, but it doesn't seem to be working. Pls help if u know ;-;

1 answer

✓ Accepted answer

Are you using a particle emitter as the trail? If so, you should make sure that when you clone it you enable it and make sure the main properties are set (rate, lifetime, speed, etc). Also I would recommend using a weld instead of an attachment just because I have had better luck using welds instead of attachments for these types of things in the past. Hope this helped! Here's a script that might work better,

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(char)
    local trail = game.ServerStorage.Trail:Clone()
    trail.Parent = char.LeftUpperLeg
    local weld = Instance.new("Weld", trail)
    weld.Part0 = trail
    weld.Part1 = trail.Parent	
    end)
end)

I'm sorry if this doesn't work, I might not completely understand the issue. Hopefully it will though. Good luck!

1 comment

0

Thank you, been busy with school lately in the past month that's why your answer didn't get accepted yet ;P

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