Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to use BoolValue with popup?

Asked by 6 years ago

Hello,

So in my model, I want to put a model popup script where the model will popup when a user joins.

Here it is:

local wat=678054912
script.Parent=game.ServerScriptService
local market=game:GetService("MarketplaceService")
for i,v in pairs(game.Players:GetChildren()) do
    if not market:PlayerOwnsAsset(v,wat) then
        market:PromptPurchase(v,wat)
    end
end
game.Players.PlayerAdded:connect(function(player)
    if not market:PlayerOwnsAsset(player,wat) then
        market:PromptPurchase(player,wat)
    end
end)
while wait(300) do
    for i,v in pairs(game.Players:GetChildren()) do
        if not market:PlayerOwnsAsset(v,wat) then
            market:PromptPurchase(v,wat)
        end
    end
end

I want to put it in a BoolValue so when it is enabled, it will play the script, but if it isn't it wont.

I have tried this

if game.Workspace.Value.Value == true then

But nothing has been working.

Any help, thanks.

0
Does it give any errors? NotInventedHere 158 — 6y
0
No, the script doesn't run in the first place whether the value is checked or not. I'm not really sure what you mean by errors. jackalota 9 — 6y

Answer this question