Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trail with attachments not adding onto player?

Asked by
vkax 85
5 years ago

Not sure why, can you help me?

game.ReplicatedStorage.remoteEvents.equipTrail.OnServerEvent:connect(function(player,plr,item,has)
    repeat wait() until player.Character
    if player.Character.Head["Trail"] then
        player.Character.Head["Trail"]:Clear()
    end
    if player.Character.Head["TrailAttachment0"] then
        player.Character.Head["Trail"]:Clear()
    end
    local trail = game.ServerStorage.trails[item]:Clone()
     trail.Parent = player.Character.Head
trail.Name="Trail"
    local attachment0 = Instance.new("Attachment",player.Character.Head)
  attachment0.Name = "TrailAttachment0"
   local attachment1 = Instance.new("Attachment",player.Character.HumanoidRootPart)
  attachment1.Name = "TrailAttachment1"
 trail.Attachment0 = attachment0
 trail.Attachment1 = attachment1
end)

By the way, it has no errors for some reason, trail removal only errors in studio.

Answer this question