Hello Roblox devs,
I was wondering is there any way to pick a random part that has the same name?
For example,
I wanted to spawn a zombie at a random spawn but the spawns have the same name.
Hello Roblox devs,
I was wondering is there any way to pick a random part that has the same name?
For example,
I wanted to spawn a zombie at a random spawn but the spawns have the same name.
You can do it like this :
local SpawnFolder = workspace.SpawnFolder
local RandomPart = SpawnFolder[math.random(1, #SpawnFolder)]
local RandomPartPosition = RandomPart.Position
You forgot GetChildren()
local SpawnFolder = workspace.SpawnFolder:GetChildren()
This does not seem to be working
It works! Thank you very much for the help!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.