Hello, so I scripted my gamepass simply, everything is functional.
I, however, have an issue with it, I placed a local script in StarterPlayer.StarterPlayerScripts
, cloning the tool with it and placing the tool back in the backpack.
However, the tool doesn’t work, I checked the scripts in that tool, and the scripts are also normal.
Another issue is that, as I’m using the CharacterAdded
event, sometimes while joining the game I get those tools, alongside the functional ones.
How do I fix these issues?
Script:
local MarketService = game:GetService("MarketplaceService")
local RadioID = 32001162
local Player = game.Players.LocalPlayer
local Radio = game.ReplicatedStorage.Radio:clone()
if MarketService:UserOwnsGamePassAsync(Player.UserId, RadioID) then
print("Player owns the Radio Gamepass!")
Player.CharacterAdded:Connect(function()
Radio.Parent = Player.Backpack
end)
end