0

# How to Detect players position before they click a button?

I have a button that teleports a player to a Position in the baseplate when they click it and I want to record the CFrame they were in before they last clicked it.

0
In the script, naturewizard 85 — 22d
0
In the script, before the teleporting occurs. naturewizard 85 — 22d
0
save the cframe to a variable JustinWe12 723 — 22d

1

In order to see the current Cframe of the player you must see it before you teleport them

Try placing this inside of your click detector This is a server script

script.Parent.MouseClick:Connect(function(plr)
local Char = game.Workspace:FindFirstChild(plr.Name)
local FirstPosition = Char.LowerTorso.CFrame -- This is where the position he was first at was
-- local FirstPosition = Char.Torso.CFrame
-- use the code above this to use R6
Char:MoveTo(game.Workspace.Part.Position) -- Put where you want him to move here
print(FirstPosition) -- this checks if the script is working(you can delete it)

end)