Spawning with tool issue

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)

maybe comine the 2

game.Players.PlayerAdded

maybe open the developer console
it looks like it should work

I will try that I am just confused why it works fine in studio but not in the main game.

I alreday looked in the dev console and can’t find anything.

by the way adding them both together did not work

maybe use print() .
do you use a acount that has the gamepass?

Yea my acount owns both of the gamepasses. I am just not sure why it works in studio but not in the game itself.

may be check HasAppearanceLoaded ( )
CharacterAppearanceLoaded ()
before

press that solved button it this solved it

1 Like