I made a gamepass that if you buy it you get a teleport gui. For some reason tho it only lasts 1 life. If I die it goes away. I need it to stay forever tho. Here is script:
local id = 6341684
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:connect(function(char)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then
local ui = script.Teleport:Clone()
ui.Parent = plr.PlayerGui
end
end)
end)
I put the gui inside of this script and it last 1 life tho. I need it to last forever. Please help.

2 comments
Where do I keep the first script and where do I keep my gui?
I'd recommend putting the first script inside StarterCharacterScript and put the GUI in ReplicatedStorage