So, this is the script in which what I want to happen is that when you click the gui it randomly chooses to spawn wherever in the map the spawns are.

local plr = game.Players.LocalPlayer local button = script.Parent button.MouseButton1Click:connect(function() plr.Character.Torso.CFrame = game.Workspace["GUIPart"].CFrame -- name of the block you want to teleport to. end)