Tunnells
(PlaySage)
March 24, 2021, 1:16pm
1
I’m basically making a shop and I want a message to show if a player doesn’t have enough money this is the code I’m using but it doesn’t work.
if Player.leaderstats.Points < 500 then
Frame.MedKitText.Enough.Visible = true
wait(5)
Frame.MedKitText.Enough.Visible = false
else
game.ReplicatedStorage.Buy:FireServer()
end
end)
end)
You need to use the .Changed event to detect changes in an IntValue in this case so it detects a change, it’ll run the code again, it probably only happens once
.Changed
Okay I did not read that very carefully, I immediately defaulted to the wrong thing haha
Tunnells
(PlaySage)
March 24, 2021, 1:19pm
3
Well you would click a gui then it would tell you if you don’t have enough E
Tunnells
(PlaySage)
March 24, 2021, 1:20pm
4
17:16:53.979 Players.Tunnells.PlayerGui.ShopHandler:25: attempt to compare Instance and number - Client - ShopHandler:25
SOTR654
(SOTR654)
March 24, 2021, 1:21pm
5
Add .Value :
if Player.leaderstats.Points.Value < 500 then