Server Script in ServerScriptService:
local ServerStorage = game.ServerStorage.RainbowTrail:Clone()
local gamepassid = 10498381
local function hasGP(pid, gpid)
return game:GetService("MarketplaceService"):UserOwnsGamePassAsync(pid, gpid)
end
local function attach(child, attachments)
for i = 1,#attachments do
local offset = tostring(i -1)
local attachment = Instance.new("Attachment")
attachment.Parent = attachments[i]
attachment.Name = "TrailAttachment"..offset
child["Attachment"..offset] = attachment
end
child.Parent = attachments[1]
end
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(chr)
if hasGP(plr.UserId, gamepassid) then
attach(ServerStorage, {chr.Head, chr.HumanoidRootPart})
end
end)
end)
For some reason the trail only works on 1 player at a time. Ex: I had the trail, my friend joined, my trail got deleted and the trail went to him.

2 comments
Works, thank you so much!
no problem!