The error is at the if statement Can someone please tell me how to fix this? its not finding the int value even though it exist in the gui!
game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.E then if script.Parent.Equip.Value == true and SlashCool == false and ManaGui.MaxMana.Value > 0 then if ManaGui.MaxMana.Value > 20 then SlashCool = true ReFol.RSKILL:FireServer() ManaGui.MaxMana.Value = ManaGui.MaxMana.Value - 20 wait(5) SlashCool = false else ManaGui.ManaEn.Visible = true ManaGui.ManaFrame.Frame.TextLabel.Text = "Not Enough Mana" wait(.3) ManaGui.ManaEn.Visible = false ManaGui.ManaFrame.Frame.TextLabel.Text = "Mana" end end end end)
EDIT:when you die and respawn it will says that it cant find maxMana
Use wait for child, which yields until the child is loaded or existed.
I Somehow fix it i don't know how though And i didn't use wait for child