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

Map voting script not working, how can I fix it? Is it fixable?

Asked by 5 years ago

Im working on a map voting system I followed from a tutorial, the scrip looks like this

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...

Im getting an error "attempt to call a user value" on line 58 and 32. How can I fix it, if it's fixable.

1 answer

Log in to vote
0
Answered by 5 years ago

Hello. The problem is that you used GetService() wrong. Instead of game("GetService, "RunService"), you have to use game:GetService("RunService"). Please try doing more research before asking. Try this:

01--player--
02local player = game:GetService("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...

Please accept and upvote this answer if it helps.

0
Appriciate it so much. I apologies, next time ill do mybest and ask as a last resort. Once again thank you so much. pokemine1o9 44 — 5y
0
That's fine, you don't need it as a last resort, but before posting just try searching on google. Anyway, no problem. youtubemasterWOW 2741 — 5y
Ad

Answer this question