And leaderstates. Would it be?
local a=game.players.character.IntValue.Value
Preferably without knowing the player name, OR a script with the player names. Yesterday, if you remember my question on Mana and MAXMana in the player. I want to know how to find out their value, so ultimately, I can have a GUI with: (Inside a TextLabel)
while true do script.Parent.Text = "Mana: " .. --How to find current mana .. "/" .. --How to find Mana) wait(0.1) end
I will also want a way to take away Mana
local a= -- How to find Mana -- Then when you cast the spell (Uses 10 Mana) local a= local a-10
The GUI doesn't work I have a text label parented to a Frame, screen GUI, Starter GUI, in the Text Label there is a script:
local MAXMana = script.Parent.Parent.MAXMana -- As you said local Mana = script.Parent.Parent.Mana -- As you said while true do script.Parent.Text = "Mana: " .. Mana .. "/" .. MAXMana.. wait(0) end
I have probably screwed something up, apologies, if I have.
The script you made yesterday that sets the IntValues. In that script, you can make a clone from the script you're trying to make now and put it in the PlayerGui.
local Script = game.ServerStorage.Script:Clone() Script.Parent = player.PlayerGui -- Change names according to your script
Now from within the script you just cloned to PlayerGui, you can do
local player = script.Parent.Parent -- This contains the Backpack, PlayerGui, leaderstats etc. local char = player.Character -- This contains the parts and humanoid.
Then in this script you can create a function like
function Cast() player.Stats.Mana = player.Stats.Mana - 10 end