I am trying to add a "if" statement where when you if you have a gamepass, it gives you a overhead gui:
if game:GetService('MarketplaceService'):UserOwnsGamePassAsync(player, vipid) then vip.TextLabel.Text = player.Name .. " - VIP" local clonedgui3 = vip:Clone() clonedgui3.Parent = game.Workspace:WaitForChild(player.Name).Head end
What I need help with is how I can get the userid on a server side script
Im pretty new to lua so go easy on me plz :)
Like this?
if game:GetService('MarketplaceService'):UserOwnsGamePassAsync(player.UserId, vipid) then vip.TextLabel.Text = player.Name .. " - VIP" local clonedgui3 = vip:Clone() clonedgui3.Parent = game.Workspace:WaitForChild(player.Name).Head end
just add .UserId
to player
on the first line