Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

GamePassService Gamepass Problem?

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!

1 answer

Your game pass part of the script is fine. Don't use server storage use replicated storage instead.

3 comments

0

And if that fails try adding a delay or wait.

0

Alright, Thanks.

0

Still doesn't work, and I added the wait().

This discussion is preserved as it was. New answers, comments, and votes are closed.