So Im making a game on Roblox and wonder how i could check if a player has a certain amount
so basically how would i check if a player has like : 10.48k strength
Note the : 10.48k strength wont be 10480 Hopefully someone get what i actually mean and something like if value == 10.48k wont work and stuck at this will appreciate any help i can get
In a local script in StarterPlayerScripts, you can do
local stat = "Strength" -- Define a variable with the stat name if script.Parent.leaderstats[stat].Value >= 10480 then -- Checks if user has at least 10480 print("Player has 10480 "..stat..".") -- Whatever you want it to do elseif script.Parent.leaderstats[stat].Value <= 10480 then -- Checks if user has less than 10480 print("Player has less than 10480 "..stat..".") -- Whatever you want it to do end
This should help you, good luck with whatever you are doing :)
~ Dan_PanMan, advanced scripter.