local debounce = true local player = script.Parent.Parent.Parent.Parent local target = game.Workspace:WaitForChild("TeleportTarget") script.Parent.MouseButton1Click:connect(function() if debounce == true then debounce = false player.Character.HumaniodRootPart.CFrame = target.CFrame * CFrame.new(0,3,0)
I wanted it to when you click you would teleport to a brick.
Try putting that in a LocalScript where local player = game.Players.LocalPlayer. Also debounce should = false and the code should be something like this
script.Parent.MouseButton1Click:connect(function() if not debounce then debounce = true local char = game.Workspace:FindFirstChild(player) char.HumanoidRootPart.CFrame = CFrame.new(Vector3.new((target.Position))*Vector3.new(0,3,0) --You could add a wait here if needed debounce = false end end)