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

How do I randomly select a part? [Unsolved]

I want a player to be teleported to a random part in a model. I tried this but it doesn't work:

-- Note this is a fragment of a script that works with normal positions
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(math.random(game.Workspace.Spawns:GetChildren().Position))

1 comment

0

I'll help! Just wait.

1 answer

game.Players.LocalPlayer.Character:MoveTo(Vector3.new(math.random(game.Workspace.Spawns:GetChildren().Position)))

Hope I helped!

3 comments

0
0

Didn't work

0

Put in localscript.

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