I am making a script that updates a TextLabel through a string value once someone joins the game and on line 30 I am getting the error in output:
Players.Osamiku.PlayerGui.Client:30: attempt to call a userdata value
here is the code:
--Player-- local player = game.Players.LocalPlayer local char = player.Character or player.CharacterAdded:wait() local gui = player:WaitForChild("PlayerGui") local ui= gui:WaitForChild("ui") --Assets-- local rep = game.ReplicatedStorage local assets = rep.Assets --Maps-- local maps = assets.Maps --Signals-- local signals = assets.Signals local event = signals.Event local fevent = signals.FEvent --Game Variables-- local Game = game.StarterGui.Game local stats = Game.Stats --Static Variables-- local vars = { currentVote=nil; services={}; } --Initiate Title Updater game("GetService", "RunService").RenderStepped:connect(function() ui:WaitForChild("Title").Text = game.StartGui.Game.Stats.Status.Value end)
Line 30 btw
Fixed your code.
--Player-- local player = game.Players.LocalPlayer local char = player.Character or player.CharacterAdded:wait() local gui = player:WaitForChild("PlayerGui") local ui= gui:WaitForChild("ui") --Assets-- local rep = game.ReplicatedStorage local assets = rep.Assets --Maps-- local maps = assets.Maps --Signals-- local signals = assets.Signals local event = signals.Event local fevent = signals.FEvent --Game Variables-- local Game = game.StarterGui.Game local stats = Game.Stats --Static Variables-- local vars = { currentVote=nil; services={}; } --Initiate Title Updater game:GetService("RunService").RenderStepped:connect(function() ui:WaitForChild("Title").Text = game.StartGui.Game.Stats.Status.Value end) --there is no such syntax as game("GetService","RunService")