I want to create and assign a variable (Energy) to the humanoid by Script like a (Health). e.g.: Energy / Humanoid / Player
Is possible without Script, however is not displayed in "Game" in the Humanoid object. • Create a variable in StarterGui • Create a variable in StarterPack • Create a variable in StarterPlayer
It's possible? Any suggestion?
Is it possible to create a variable for the Humanoid object per instance?
humanoid = Instance.new ("Humanoid")
(I do not know how it works)
I already spent 10 hours of research and I did not find anything
You cant add a new proppertie to the Humanoid I think but you can add new Values though. Like this below! :
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local stamina = Instance.new("IntValue")--- AN IntValue is a Value that only has Whole Numbers or Integers stamina.Parent = character---Set The Parent for the Stamina "IntValue" stamina.Name = "Stamina"---Set the Name for it stamina.Value = 100 --- Set the Value for it! ---And Boom! Now you have your new stamina value inside your character! :D ----Now you can refference it by saying "player.Character.Stamina" or "player.Character:WaitForChild("Stamina")" end) end)
A simple solution might be to just put a value inside the starterCharacter folder.