Hi!
I'm very new to scripting, so apologies if this isn't explained very well.
I have a script where if somebody steps on a hat and they have enough money, it will give them the hat. If they do not have enough money, I wanted it to come up with a ScreenGUI stating they don't have enough money. I disabled the ScreenGUI and went into test mode. I tried to step on the hat without enough money to purchase it and it didn't enable the ScreenGUI. It's enabling it in the ScreenGUI properties in the bottom of the screen but it is not coming up on my screen. Thanks in advance if anybody can help me! Here is the script:
---------------------------------------------------------------------------------
local hair = game.Workspace["Cool Hair"]
function onTouch()
if game.Players.Player1.leaderstats.Money.Value == 100 then
hair.give.Disabled = false
game.Players.Player1.leaderstats.Money.Value = (game.Players.Player1.leaderstats.Money.Value - 100)
else
game.StarterGui.No.Enabled = true
end
end
script.Parent.Touched:connect(onTouch)
|