local Player = game.Players.LocalPlayer
local Stats = Player:WaitForChild("leaderstats")
local Figure = script.Parent
local Humanoid = Figure:WaitForChild("Humanoid")
local EXP = Stats:WaitForChild("EXP")
while Humanoid.Health < 1 do
EXP.Value == EXP.Value + 1
Figure:Destroy()
end
I wanna have this make it so when the zombie dies, it gives the player EXP, I can't figure out what is wrong with this script, and it showsup as an error in line 8, under EXP.Value. Does anyone know why? (This is a LocalScript)

2 comments
Local.
Since you're doing this in a LocalScript, it only happens on the Client Side, not the Server Side. Try using RemoteEvents and a ServerScript and a LocalScript.