Teleport Button doesn't work

Hello, so like you already readed in the title, my teleport button doesn’t work
If I push the button, it will teleport me but to the cordinats: 0,0,0

So what is wrong with this script that I use?

function onClicked()
local p = game.Players:GetChildren()
for i = 1, #p do
		p[i].Character:MoveTo(Vector3.new("-43, 171, 85"))
end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
1 Like

Why is your Vector3.new a string?
Just keep it as a number, you can’t do vector3 with strings:
p[i].Character:MoveTo(Vector3.new(-43, 171, 85))

2 Likes

ow yeah :sweat_smile:
my mistake, I’m not that good at scripting
Thanks For The Help

2 Likes