How to use BoolValue with popup?
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:
02 | script.Parent = game.ServerScriptService |
03 | local market = game:GetService( "MarketplaceService" ) |
04 | for i,v in pairs (game.Players:GetChildren()) do |
05 | if not market:PlayerOwnsAsset(v,wat) then |
06 | market:PromptPurchase(v,wat) |
09 | game.Players.PlayerAdded:connect( function (player) |
10 | if not market:PlayerOwnsAsset(player,wat) then |
11 | market:PromptPurchase(player,wat) |
15 | for i,v in pairs (game.Players:GetChildren()) do |
16 | if not market:PlayerOwnsAsset(v,wat) then |
17 | market:PromptPurchase(v,wat) |
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
1 | if game.Workspace.Value.Value = = true then |
But nothing has been working.
Any help, thanks.