Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Roblox attempt to call a userdata value errror in my code. why?

Asked by 5 years ago
Edited 5 years ago

So, I followed a tutorial on how to make a Roblox map voting system but I keep getting this error "attempt to call a userdata value" this happens on these two lines of code:

1table.insert(vars.services, game("GetService","RunService").RenderStepped:connect(function()

and

1game("GetService","RunService").RenderStepped:connect(function()

If anybody knows how to fix this I would greatly appreciate it! it's the only error I am currently getting. Thanks :)

Whole script:

01--player--
02local player = game.Players.LocalPlayer
03local char = player.Character or player.CharacterAdded:wait()
04local gui = player:WaitForChild("PlayerGui")
05local ui = gui:WaitForChild("ui")
06 
07--Assets--
08local rep = game.ReplicatedStorage
09local assets = rep.Assets
10 
11--Maps--
12local maps = assets.Maps
13 
14--Signals--
15local signals = assets.Signals
View all 60 lines...
0
Your script is outdated. youtubemasterWOW 2741 — 5y

1 answer

Log in to vote
1
Answered by
iuclds 720 Moderation Voter
5 years ago

You can add services into a table, but its really dumb, considering you can add this to the top of your script

1local RunService = game:GetService("RunService")
2 
3RunService.RenderStepped:Connect(function()
4    -- ...
5end)
0
Sadly this didnt work, ill send the whole script pokemine1o9 44 — 5y
0
I edited it to see the whole script pokemine1o9 44 — 5y
Ad

Answer this question