Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why my random map choose script not working?

I think i am correct but what is the wrong?

local ChoosenMap2 = game:GetService("ReplicatedStorage").Values:WaitForChild("ChoosenMap").Value

game:GetService("ServerStorage"):WaitForChild("Maps")(ChoosenMap2):Clone().Parent = game:GetService("Workspace")
20:54:42.495 - Spleef is not a valid member of Folder

2 comments

0

Give more details please

0

Line 3. ChosenMap2 is wrapped in brackets, which are math exclusive. Remove them.

1 answer

As incapaz said, you should wrap ChosenMap2 in brackets.

local ChoosenMap2 = game:GetService("ReplicatedStorage").Values:WaitForChild("ChoosenMap").Value

game:GetService("ServerStorage"):WaitForChild("Maps")[ChoosenMap2]:Clone().Parent = game:GetService("Workspace")

If it keeps erroring, make sure the map you input exists actually in the folder.

This discussion is preserved as it was. New answers, comments, and votes are closed.