I’m Trying To Clone A UI To Every Player That Has A Gamepass When U Clone Into One Player And Another Player With That Gamepass Join The First Players UI Deletes And The 2nd Player Gets It.
Script Is In ServerScriptService
local Rep = game:GetService("ServerStorage")
local UI = game.ServerStorage.TeleportUI
local gamepassID = 15973998 --your gamepass id
local MS = game:GetService("MarketplaceService")
--now check if the player has the gamepass
game.Players.PlayerAdded:Connect(function(player) --player added event
if MS:UserOwnsGamePassAsync(player.UserId, gamepassID) then --check if player has gamepass
UI:Clone().Parent = player.PlayerGui --set clone parent to playergui
end
end)