Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

Gamepass not for sale and isnt owned issue?

Asked by 16 days ago

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?

0
Please read my answer. (if it works accept it) WideSteal321 309 — 15d

1 answer

Log in to vote
1
Answered by 16 days ago
Edited 14 days ago

Ok, you're script EDITED THIS IS EDITED ITS JUST HARD TO SEE!

Gamepassid = 5654588



function Click(mouse)
player = game.Players.LocalPlayer.Name
player2 = game.Players.LocalPlayer
if MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamepassId) then --it is no longer PlayerOwnsAsset 
    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"):PromptGamePassPurchase(player2,Gamepassid) --it is no longer PromptPurchase


end
end


script.Parent.MouseButton1Down:Connect(Click)


ROBLOX Changed how it works, instead of being in library it is now it's own separate thing.

You are trying to sell this

P.S. You can't sell a place. (unless it's paid access)

Hope this helped!

0
OOF wait WideSteal321 309 — 15d
0
OK, fixed. WideSteal321 309 — 15d
0
He is correct. If you want you should probably sell a gamepass to access a place, or sell access to a game, but you can't just sell a place. greenhamster1 112 — 14d
0
Yeh also CAN HE ACCEPT IT??!?! WideSteal321 309 — 14d
View all comments (4 more)
0
Hint is deprecated. you can use TextLabel with GUI's. and :connect is deprecated. use :Connect yHasteeD 1467 — 14d
0
Thanks, I have fixed the problem. WideSteal321 309 — 14d
0
sorry about taking so long in replying im not trying to sell the place you linked im trying to sell the game pass 95jake95 7 — 11d
Ad

Answer this question