Hello,
So I need to make it so that if you own a gamepass it will give you a tool. I have done the script but for some reason it only works in studio and when I try it in the main game it does not work.
I think it must be to do with loading to fast or something but not sure how to fix this.
game.Players.PlayerAdded:Connect(function(plr)
if MPS:UserOwnsGamePassAsync(plr.UserId, 21756136) == true then
wait(5)
plr:WaitForChild("Backpack")
local Clone = game.ServerStorage.GamepassItems:WaitForChild("HandlessSegway"):Clone()
Clone.Parent = plr.Backpack
end
end)
game.Players.PlayerAdded:Connect(function(plr)
if MPS:UserOwnsGamePassAsync(plr.UserId, 21756072) == true then
plr:WaitForChild("Backpack")
local Clone = game.ServerStorage.GamepassItems:WaitForChild("RedBallooninfinite"):Clone()
Clone.Parent = plr.Backpack
end
end)