How to Get a player position and turn that into a variable

Hi all
I am making a horror game in which I want to get the player’s
humanoid position in order to start a tween from their position to a certain position.

I have no idea how to get the players position and want to know how.

Thank you

local Position = Character.HumanoidRootPart.Position

if you want to make a tween you can do like so
NOTE : you must indicate the character and the TweenInfo based on your script.

local TweenService = game:GetService("TweenService")
TweenService:Create(Character.HumanoidRootPart,TweenInfo,{Goal = CFrame = YourCFrame)

Thank you but I already know how to make a tween function.

I believe what you actually want to do is Humanoid:PivotTo() and pass in your position

ServerScriptService.Script:4: attempt to index nil with ‘Position’

so i am getting this error when i am trying

local Position = Character.HumanoidRootPart.Position