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

I need some help with giving people with a pass a certain team and giving other people another team?

I need some help really bad im trying to give my players who have a gamepass a team but its just not working heres my code if you can help me i have used local script and just script

local mps = game:GetService("MarketplaceService")

local gamepass_id = 9600997

local Teams = game:GetService("Teams")



game.Players.PlayerAdded:Connect(function(player)

if mps:UserOwnsGamePassAsync(player.UserId, gamepass_id) then

player.Team = Teams.GoldCustomer



else

player.Team = Teams.Customer



end

end)

1 comment

0

1 answer

You can't set values from one client and expect it to affect other clients. So you'll have to do this in a normal script on the server not a local one.

1 comment

0

server storage or serverscripts?

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