local button = script.Parent local Players = game:GetService("Players") local player = Players.LocalPlayer or Players:GetPropertyChangedSignal("LocalPlayer"):wait(2) local strength = player.Stats.Strength.Value local str = player.Stats.Strength button.Text = strength local function onChanged() a = str:GetPropertyChangedSignal("Value"):Connect(onChanged) if a then print("fired") button.Text = strength end
How could I get it to refresh the Strength.Value to the new value without having to respawn the character?
error code
Players.Xayzen.PlayerGui.ScreenGui.Frame.STRVALUE.LocalScript:12: Expected 'end' (to close 'function' at line 7), got <eof>
heyyy u forget the end at the if statement rbrrxzzzz
local button = script.Parent local Players = game:GetService("Players") local player = Players.LocalPlayer or Players:GetPropertyChangedSignal("LocalPlayer"):wait(2) local strength = player.Stats.Strength.Value local str = player.Stats.Strength button.Text = strength local function onChanged() a = str:GetPropertyChangedSignal("Value"):Connect(onChanged) if a then print("fired") button.Text = strength end end