local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function(click)
if player.leaderstats.Money.Value >= 3000 then
player.leaderstats.Money.Value = player.leaderstats.Money.Value - 3000
game.ReplicatedStorage.Tools.MegaGravityCoil:Clone().Parent = player:WaitForChild("Backpack")
elseif player.leaderstats.Money.Value <= 3000 then
game.StarterGui.ScreenGui.NotEnough.Visible = true
end
end)
✓ ANSWER ACCEPTED
How to make if not enough and true visible?
1 answer
✓ Accepted answer
Contents of StarterGui are automatically replicated to the PlayerGui, so you would reference your frame there instead. Also, I don't entirely understand your question. Wdym 'if not enough visible'?
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
script.Parent.MouseButton1Click:Connect(function(click)
if player.leaderstats.Money.Value >= 3000 then
player.leaderstats.Money.Value = player.leaderstats.Money.Value - 3000
game.ReplicatedStorage.Tools.MegaGravityCoil:Clone().Parent = player:WaitForChild("Backpack")
elseif player.leaderstats.Money.Value <= 3000 then
playerGui.ScreenGui.NotEnough.Visible = true
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
thanks its working
no problem :)