Put a folder named “SpawnLocations” in workspace and put parts in (Part1,Part2,Part3…)
then , if your button is a GUI button , put a Local script in:
script.Parent.MouseButton1Clicked:Connect(function())
local MaxPart = 3 -- How many Spawn locations you have.
local HRP = game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart")
HRP.CFrame = game.Workspace.SpawnLocations["Part"..math.random(1,MaxPart).CFrame
end)
else , if your button is a ClickDetector , put a local script in:
script.Parent.ClickDetector.MouseClick:Connect(function())
local MaxPart = 3 -- How many Spawn locations you have.
local HRP = game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart")
HRP.CFrame = game.Workspace.SpawnLocations["Part"..math.random(1,MaxPart).CFrame
end)
I hope it’ll works , I didn’t test it so , tell me if it doesn’t work! 
make a room somewhere with a “Spawn Location” in.


