Price updating on surface gui

I wanna update my surface gui

I have been trying but i cant get it to update

I have tried everything that have came to my mind. Im a new dev and not experianced

local player = game.Players.LocalPlayer

local PStats = player.Stats

local PlayerGui = player.PlayerGui

local BaseMoreTimeUpgradeCost = PStats.BaseMoreTimeUpgradeCost

script.Parent.Text = BaseMoreTimeUpgradeCost.Value

BaseMoreTimeUpgradeCost:GetPropertyChangedSignal("Value"):Connect(function()
	
	script.Parent.Text = BaseMoreTimeUpgradeCost.Value
	
end)

Is this a local script or a server script? If it is a server script then change it to local because it can’t access LocalPlayer
Where is the script located? Have you made sure script.Parent is a TextLabel and not SurfaceGui?
Finally, does it print any errors in the output?

The script works fine if there is nothing wrong though

1 Like

Its a local script and yes its correctly placed and its inside the text label

Nevermind that, you need to put the SurfaceGui in StarterGui and set the Adornee to the part

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.