To expand upon my other answered question, I want to teleport someone who clicks a text button to a random area on the baseplate that I specify (i.e. a spawn point ). I want to try a table and pull random values from that, but I'm not sure that it will work.
The current code I have and want to edit is below.
bin = script.Parent
Part = game.Players.LocalPlayer.Character
function onClick()
if Part.FindFirstChild("Torso") then
Part.Torso.CFrame = CFrame.new(Vector3.new(6, -28, 2)
end
end
bin.MouseButton1Click:connect(onClick)
If you could, please comment the changes you made to the script, and highlight the things I did wrong. Thanks in advance.

2 comments
The game doesn't seem to like line 11, with the output saying "Players.Player1.PlayerGui.ScreenGui.TextButton.Script:11: bad argument #2 to 'random' (number expected, got nil)".
Did you change the Base variable to the correct part..?