Hi there! I'm having an issue with my game title updater. It's supposed to refresh the text at the top of the screen so you know what's going on, like the intermission and so on. The updater works perfectly in the studio, but when I test it on the actual Roblox platform in-game, it returns with the error message: attempt to call userdata value
. I have tried putting a delay on the function so it gives a little time for the player to join in before it starts running, but it doesn't seem to work. Here is the code below:
game("GetService","RunService").RenderStepped:connect(function() ui:WaitForChild("Title").Text = game.Workspace.Game.Stats.Status.Value end)
A couple things:
-The ui
is the ScreenGui that holds the text.
-The game.Workspace.Game.Stats.Status.Value
is the value that you can change to change the text at the top of the screen.
If someone could take a look at this and help, that would be greatly appreciated!
That is a deprecated form of reference, frankly I’m shocked to see it. Use game:GetService("RunService")
instead. Or, optionally connect a GetPropertyChangedSignal
to the Status Value and load in the new Text this way.
local Status = workspace.Game.Stats.Status Status:GetPropertyChangedSignal("Value"):Connect(function(Changed) print(Changed) end)