local leaderstats = game.Players.LocalPlayer.leaderstats local level = leaderstats.Level local exp = level:WaitForChild("EXP") local levelDisplay = script.Parent.Level local expDisplay = script.Parent.Exp exp.Changed:Connect(function() expDisplay.Text = "Exp: "..exp.Value "/1000" end) level.Changed:Connect(function() levelDisplay.Text = "level: "..level.Value end)
changing the level works but not the exp i get an error
Error attempt to call field 'Value' (a number value)
local script in a screenGUI
You're gonna hate yourself for this, but you missed the concatenation ".." here:
expDisplay.Text = "Exp: "..exp.Value.. "/1000"
Try this:
local Player = game.Players.LocalPlayer repeat wait() until Player.leaderstats local leaderstats = Player.leaderstats