Hi,
I have a local script inside of a GUI that is for teleporting a player to a specific coordinate when clicked, but what I want is for it to teleport you to a random coordinate. Although not any random coordinate one from a set of coordinates
This is my script so far:
it works fine but only teleports you to one coordinate.
I have tried to look for an answer but have not found one and tried typing or and another coordinate but it does not work (also I am planning to add at least 10 possible coordinates).
You can make a table of your listed vector values and grab a random value from the table
local vectors = {input your vector values here seperated by comma} -- Vector3.new(141.016, 200, 236.361) is an example to put in the table
local randomVector = math.random(1,#vectors)
local button = script.Parent
button.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
player.Character.HumanoidRootPart.CFrame = CFrame.new(vectors[randomVector]) -- or atleast I assume
script.Parent.Parent.Visible = false
end)