Okay so I am trying to make what I thought would be simple gamepass that gives the player a particle effect. Here is was I first had, which works.
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(char)
local Trail1 = Instance.new("Sparkles")
Trail1.Parent = char:WaitForChild("Left Leg")
local Trail2 = Instance.new("Sparkles")
Trail2.Parent = char:WaitForChild("Right Leg")
end)
end)
Then I tried adding this.
local passId = 573245655 -- change this to your game pass ID.
function isAuthenticated(player) -- checks to see if the player owns your pass
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end
game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(char)
local Trail1 = Instance.new("Sparkles")
Trail1.Parent = char:WaitForChild("Left Leg")
local Trail2 = Instance.new("Sparkles")
Trail2.Parent = char:WaitForChild("Right Leg")
end)
end)
end
end)
But it didn't work, could someone please let me know what I am doing wrong here? And also if there is an easier way of doing this? Thanks!

2 comments
One thing I can really suggest would be just putting the trial into the players Torso. A problem I see is you have 2 PlayerAdded functions
The thing is, I want it to me coming from their feet not torso, is there's a better way I could be doing this?