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 7 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:

01local wat=678054912
02script.Parent=game.ServerScriptService
03local market=game:GetService("MarketplaceService")
04for i,v in pairs(game.Players:GetChildren()) do
05    if not market:PlayerOwnsAsset(v,wat) then
06        market:PromptPurchase(v,wat)
07    end
08end
09game.Players.PlayerAdded:connect(function(player)
10    if not market:PlayerOwnsAsset(player,wat) then
11        market:PromptPurchase(player,wat)
12    end
13end)
14while wait(300) do
15    for i,v in pairs(game.Players:GetChildren()) do
16        if not market:PlayerOwnsAsset(v,wat) then
17            market:PromptPurchase(v,wat)
18        end
19    end
20end

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

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

But nothing has been working.

Any help, thanks.

0
Does it give any errors? NotInventedHere 158 — 7y
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 — 7y

Answer this question