When my script checks if a player has a gamepass, It does it successfully (no errors) but doesn't give the trail (ParticleEmitter). I don't know why, I've tried a lot of things to fix it.
Here's the script:
print("script loaded")
game.Players.PlayerAdded:connect(function(player)
local GamepassService = game:GetService("GamePassService")
player:WaitForDataReady()
player.CharacterAdded:connect(function()
if GamepassService:PlayerHasPass(player, 389785824) then
local ServerStorage = game.ServerStorage
local p = ServerStorage.TrailStorage:WaitForChild("Simplism")
local p2 = p:Clone()
local Char = game.Workspace:WaitForChild(player.Name)
p2.Parent = Char.Torso
else
print("plr doesn't own asset 389785824")
end
end)
end)
Any help is appreciated. Thanks!

3 comments
And if that fails try adding a delay or wait.
Alright, Thanks.
Still doesn't work, and I added the wait().