I've been trying to do this for a while now but hasn't worked out that well... I'm using this code currently:
local player = game.Players.LocalPlayer.Character
local redtrail = game.Workspace.RedTrailButton.ClickDetector
redtrail.MouseClick:connect(function()
local trail = game.ServerStorage.RedTrail:Clone()
trail.Parent.Parent = game.Workspace.player.Head
local attachment0 = Instance.new("Attachment", player.Head)
attachment0.Name = "TrailAttachment0"
local attachment1 = Instance.new("Attachment", player.HumanoidRootPart)
attachment1.Name = "TrailAttachment1"
trail.Attachment0 = attachment0
trail.Attachment1 = attachment1
end)
This is a LocalScript, because if it was a normal script it would return as a nil value which is annoying.
But when I click the brick it never gives me the trail, it also gives me no errors in the console when clicked. Any help on how to make it give me a trail?
Also, everything is in the right place. The "player" bit refers to your character so that it can add it to the Torso area.

6 comments
Maybe use a weld
When I make it so the trail is given when the player joins, it works. But then when I use a button, it won't give one. I'm not sure how to use a Weld, sorry I am quite bad at LUA.
Weld is an Instance it can hold 2 things together in weird position
Attachment0 and attachment1 need an attachment instance. Don't ask my why it can't use BaseParts or anything, just deal with it. Also, a trail is NOT a BasePart.
Also, it is Lua, not LUA.
You can't access ServerStorage through a LocalScript, why has no one pointed that out?