Hello fellow devs!
Currently I am developing Samurai Era
where I want to add Spirit meter, in addition to Health meter
as shown below.
Here are the requirements:
- Spirit recovers at certain speed like Health while it is less than 100%.
- Certain amount of Spirit should be consumed when a player use a special ability.
I wrote a code on a local script under the GUI frame,
but it does not work without showing any error message.
Blockquote
local spiritDisplay = script.Parent
local xScale = spiritDisplay.Size.X.Scale
while xScale < 1 do
xScale += 0.1
wait(1)
end
Blockquote
What’s wrong with my code?
I will appreciate if someone help me.