I want "ModeText" to display the ammount of mode the player has, the mode should start with 0 and fill by 2% every 3 seconds, but it doesnt work and I dont know why. this is my gui: StarterGui > ModeBarGui (gui) > ModeBarDisplay (frame) > ModeBarScript (local script) and ModeText (text label)
this is the script located in gui:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local PlayerMode = script.Parent.ModeText
local ModeAmount = 0
while true do
ModeAmount = ModeAmount + 2
wait(3)
end
humanoid.ModeAmountChanged:Connect(function(FillMode)
script.Parent.Size = UDim2.new(ModeAmount, 0, 1, 0)
PlayerMode.Text = ModeAmount .. "%"
end)

1 comment
Thanks you so much it worked, and it also explains why some of my previous scripts didnt work