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

local ChosenMap = AvaliableMaps [math.random(1, #AvaliableMaps)] not working. How do I fix this?

Asked by 2 years ago
Edited 2 years ago

I'm making a swordfight game on roblox currently. This line of code is giving me an error saying:

" ServerScriptService.MainScript:39: attempt to get length of a nil value - Server - MainScript:39 "

local ChosenMap = AvaliableMaps [math.random(1, #AvaliableMaps)]

I have looked through other problems like this and have still not found the answer.

Any help is appreciated.

Thanks!

0
Can you provide the script to me? GoldenKnightFly 0 — 2y
0
use WaitForChild instead of FindFirstChild when defining AvailableMaps greatneil80 2647 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

Thanks greatneil80

Ad

Answer this question