I am trying to make a teleport block that takes the player across the map. It works when I'm in Roblox studio, but when I try to test it through the actually player, it doesn't work. I tried to fix it the same way other people have fixed it in the past. (put wait (1)) thing. I also made sure that the player actually does hit the block. here is the code, it is pretty simple, but I have never worked with LUA before (or any code) so I have no idea what I'm doing.
script.Parent.Touched:connect (function(hit)
if hit.Parent:FindFirstChild('Humanoid')then
hit.Parent.Torso.CFrame = CFrame.new(74.622, 29.835, -202.916)
end
end)
It is probably either very simple or very dumb, but I hope I can get a fix to it.

1 comment
it’s Lua not LUA