So I am Making a game where you drive buses around and I have made a gamepads to buy a golden bus. I think I have done everything right but it isn't working... Here is the script:
game.Players.PlayerAdded:Connect (function(player) if game.MarketplaceService:PlayerOwnsAsset(player,11136750) then location = game.Workspace regen = game.ServerStorage.Buses.GoldenBus save = regen:clone() back = nil function onClicked() if back ~= nil then back:remove() end back = save:clone() back.Parent = location back:MakeJoints() end end end)
Use UserOwnsGamePassAsync.
game.Players.PlayerAdded:Connect (function(player) if game.MarketplaceService:UserOwnsGamePassAsync(player, 11136750) then -- if it's a gamepass, you have to use that. if it's an asset like a model/hat, you'll use playerownsasset location = game.Workspace regen = game.ServerStorage.Buses.GoldenBus save = regen:clone() back = nil function onClicked() if back ~= nil then back:remove() end back = save:clone() back.Parent = location back:MakeJoints() end end end)