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.
✓ ANSWER ACCEPTED
How to Detect players position before they click a button?
1 answer
✓ Accepted answer
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
In the script,
In the script, before the teleporting occurs.
save the cframe to a variable