I made a script in the StarterCharacterScripts folder which is meant to spawn the player in a (somewhat) random location, by putting 4 Vector3s in an array, selecting one of them and moving the HumanoidRootPart to the selected location by using the CFrame command.
Here's my code:
local HumanoidRootPart = script.Parent:WaitForChild("HumanoidRootPart")
local PossiblePlaces = {Vector3.new(-350, 3, -350), Vector3.new(-350, 3, 350), Vector3.new(350, 3, 350), Vector3.new(350, 3, -350)}
HumanoidRootPart.CFrame = CFrame.new(PossiblePlaces[math.random(1, 4)], Vector3.new(0, 3, 0))
Can anyone help?
