script1 path: game.StarterGui.AgilityValue.AgilityValueChange
local agility = script.Parent.Value
local function onRunning(speed)
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Running:Connect(onRunning)
if speed >0 then
timeStarted = time()
else
local agilitygain = (time()-timeStarted)
agility = (agility+agilitygain)
agility = math.floor(agility)
script.Parent.Value = (agility)
end
end
ok, so this script successfully changes the value of AgilityValue. But, in the other script i have,i am facing an issue.
script2 path: game.StarterGui.ScreenGui.Menu.MenuGUI.StatFrame.Agility.AgilityValueScript
local agility = game:GetService("StarterGui").AgilityValue.Value
local agilityText = script.Parent.Text
game.StarterGui.AgilityValue.Changed:Connect(function()
agilityText = ("Agility:")..agility
end)
Even though I am using the right path of agility, the agilityText remains as "Agility:" without showing the agility value next to it.
I would really appreciate it if someone helped me out, thanks :D

1 comment
Changing the text from StarterGui will only change the text for players who join after you change it. StarterGui clones itself into players when they join, so you'll have to change it within the player instead