Basically tried to make an energy bar.
script.Parent.Parent.Energy.Text = script.Parent.Parent.Energy.Integer.Value
Text is always equal to Integer Value..
local Energy = script.Parent.Parent.StarterGui.StatsGui.Frame.Energy.Integer Energy = Energy -1
So when a player uses the magic, the Integer will -1 one but i get error :(
23:12:23.086 - StarterGui is not a valid member of Player 23:12:23.087 - Script 'Players.Player.Backpack.WizardStaff', Line 73 23:12:23.087 - Stack End
Sos :(!
Players use PlayerGui
Just as the error says, StarterGui
is not a member of Player - PlayerGui
is. When a Player respawns, the StarterGui is typically cloned over into the PlayerGui.
StarterGui isn't copied over to Player, only the contents of StarterGui.
local Energy = script.Parent.Parent.StatsGui.Frame.Energy.Integer
Something like that should fix it. Basically just remember that StarterGui is not copied over, so it's never part of the Player
script.Parent.Parent.Energy.Text = ""..script.Parent.Parent.Energy.Integer.Value..""
Text needs a string value, but I'm guessing that Integer has an Int value. We need to put the Int value inside of a String value to get it working properly. That should fix it