So, i made this script for my game witch is supposed to teleport the player to a random position with the values i put in when you click teleport on the Gui but for some reason it does not work?
function Click()
script.Parent.Text = "Teleporting"
wait(3)
script.Parent.Parent.Parent.Parent.Character.Torso.CFrame = CFrame.new math.random(-9.8, 5.68, 76.2, -9.8, 5.68, 1.2,-9.8, 5.68, -81.8)
script.Parent.Text = "Disabled"
wait(0.01)
script.Disabled = true
end
script.Parent.MouseButton1Down:connect(Click)
Can anyone help me fix this or tell me what i did wrong?
Thanks

2 comments
I think only two values can be an argument within math.random()
So what do i use to add multiple values to it?