I posted a question yesterday,about a game pass issues that was resolved but a another issue has arisen.
this script
Gamepassid = 5654588
function Click(mouse)
player = game.Players.LocalPlayer.Name
player2 = game.Players.LocalPlayer
if game:GetService("GamePassService"):PlayerHasPass(player2, Gamepassid)then
character = player.Character
stage = tostring(player.Leaderstats.Steps.Value)
stagepart = game.Workspace.Steps:FindFirstChild(stage)
stagepos = stagepart.CFrame
if game.Workspace.Steps:FindFirstChild(stage)== nil then
msg = Instance.new("Hint")
msg.Text = "Step still Loading Please try again in a few seconds"
else
character.HumonoidRootPart.CFrame.Value = stagepos + CFrame.new(0,3,0)
end
else
game:GetService("MarketplaceService"):PromptPurchase(player2,Gamepassid)
end
end
script.Parent.MouseButton1Down:connect(Click)
Gave the following
- GamePassId '5654588' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead.
5654588 is a game pass seen here
I followed the recommend edit form the output
Gamepassid = 5654588
function Click(mouse)
player = game.Players.LocalPlayer.Name
player2 = game.Players.LocalPlayer
if game:GetService("MarketplaceService"):PlayerOwnsAsset(player2, Gamepassid)then
character = player.Character
stage = tostring(player.Leaderstats.Steps.Value)
stagepart = game.Workspace.Steps:FindFirstChild(stage)
stagepos = stagepart.CFrame
if game.Workspace.Steps:FindFirstChild(stage)== nil then
msg = Instance.new("Hint")
msg.Text = "Step still Loading Please try again in a few seconds"
else
character.HumonoidRootPart.CFrame.Value = stagepos + CFrame.new(0,3,0)
end
else
game:GetService("MarketplaceService"):PromptPurchase(player2,Gamepassid)
end
end
script.Parent.MouseButton1Down:connect(Click)
this just says item isn't for sale but the item is for sale.. also i own the item as its my item so it shouldn't even show the buy item dialog.
whats going wrong?

1 comment
Please read my answer. (if it works accept it)