Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

RBXScriptSignal value Error

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!

Quincitizens

Member
Reputation: 0 / 0 / 0
Oct 22, 2019
32
3
8
Roblox
Quincitizens
Hello! I got a RBXScriptSignal value Error and i don't know how to solve it

Lua:
local mps = game:GetService("MarketplaceService")

local devProductID = 1162879127


local plr = game.Players.LocalPlayer

local button = script.Parent


button.MouseButton1Click:Connect(function()

    mps.PromptPurchaseFinished(plr, devProductID)
end)

--if plr.leaderstats.Stage.Value == "The End" then return end


It is a problem in line 13
 
Solution
What are you aiming to do? If you are trying to prompt the player to buy a Dev product this code shall do the job:

Prompt purchase:
local MarketplaceService = game:GetService("MarketplaceService")
local Players =...

thecatmeow1223

Active Member
Reputation: 1 / 0 / 0
Oct 24, 2020
542
7
134
43
an unknown place in the world
web.roblox.com
Roblox
TheMeowingNoob
What are you aiming to do? If you are trying to prompt the player to buy a Dev product this code shall do the job:

Prompt purchase:
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
 
local productID = 0000000  -- Change this to your developer product ID
 
-- Function to prompt purchase of the developer product
local function promptPurchase()
    local player = Players.LocalPlayer
    MarketplaceService:PromptProductPurchase(player, productID)
end

yourbutton.MouseButton1Click:Connect(promptPurchase)
 
Solution

Quincitizens

Member
Reputation: 0 / 0 / 0
Oct 22, 2019
32
3
8
Roblox
Quincitizens
I get
Players.Quincitizens.PlayerGui.SkipStageGui.SkipStageButton.SkipStageButtonHandler:12: attempt to index nil with 'MouseButton1Click'
at line 12