So, this I tested this in a local script, and a server script (default script), and none of them are working. This script was originally designed to work to the extent where when a player clicks the gui button, it teleports them, makes the gui non-visible, and locks the players screen in first person.
However, it isn't working. Help?
local Button = script.Parent
Frame = script.Parent.Parent.gggg
function onClick()
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(-0,1,43)
wait()
game.Players.LocalPlayer.Character.Torso.Anchored=true
wait()
Frame.Visible = false
end
Button.MouseButton1Click:connect(onClick)

5 comments
You're using LocalPlayer, so you must use a LocalScript.
I'm using a LocalScript.
Tested, works as it should.
Is your script in a gui?
you can see what I did here: http://www.roblox.com/Tis-Working-place?id=190115560