So i was making a game pass then I scripted it. Then I noticed that it wasn't working so I came here. I then ended up fixing that problem but now there's another problem. My script is only working in studio and not in game. It is a server script and is inside of the ServerScriptService.

What do I do?

Here is the script just in case you want to see it.

local gamepassserivce = game:GetService("MarketplaceService")
local id = 7905956
game.Players.PlayerAdded:Connect(function(player)
	if gamepassserivce:UserOwnsGamePassAsync(player.UserId,id) then
	local clone = game.ReplicatedStorage.GamePassStorage["Master Sword"]:Clone()
	wait()
	clone.Parent = player.Backpack
	end
end)

3 comments

0

When you go into the actual game, click F9 and check if there are any error logs in the tab marked Server.

0

There were no errors :(

0

I also have that issue regarding tweening a door, so I might be helped here aswell.