I'm doing my stats gui, most every time a number is added I have to reset the character to change how do I change the gui the moment I click?
Script at the numbers:
local player = game.Players.LocalPlayer
local userId = player.UserId
local Data = player:WaitForChild("Data")
local Stats = script.Parent
local SkillPoints = Stats:WaitForChild("SkillPoints")
local Defense = Stats:WaitForChild("Defense")
local Health = Stats:WaitForChild("Health")
local MaxMana = Stats:WaitForChild("MaxMana")
local ManaDamage = Stats:WaitForChild("ManaDamage")
local MaxStamina = Stats:WaitForChild("MaxStamina")
local Strength = Stats:WaitForChild("Strength")
local Speed = Stats:WaitForChild("Speed")
Defense.Text = ""..Data.Defense.value
Health.Text = ""..Data.Health.value
MaxMana.Text = ""..Data.MaxMana.value
ManaDamage.Text = ""..Data.ManaDamage.value
MaxStamina.Text = ""..Data.MaxStamina.value
Strength.Text = ""..Data.Strength.value
Speed.Text = ""..Data.Speed.value
SkillPoints.Text = ""..Data.SkillPoints.Value`
--Script upgrade stats:
local player = game.Players.LocalPlayer
local Data = player:WaitForChild("Data")
local Button = script.Parent
function onClick()
Data.Speed.Value = Data.Speed.Value + 1
Data.SkillPoints.Value = Data.SkillPoints.Value - 1
script.Sound:Play()
end
Button.MouseButton1Click:connect(onClick)

2 comments
Next time, hi-light all your code and click that big blue Lua icon, instead of the inline code option.
Ok, Thanks