Im trying to move a player, so im using a BodyPosition, but when i use it, it does not insert a BodyPosition. There are no errors, so I do not understand why it does not work. Here is my script.
local head = player:WaitForChild('Head')
v = true
print("Fall mode")
workspace.CurrentCamera.CameraType = "Custom"
Player:LoadCharacter()
local character = Player.Character
if not character or not character.Parent then
character = Player.CharacterAdded:wait()
end
print("tp")
local Force = Instance.new("BodyPosition")
Force.Parent = character:WaitForChild("Head")
head:WaitForChild("BodyPosition").Position.X = Player.PlayerGui.FreeCam.PlaceHolder.Value.X
head:WaitForChild("BodyPosition").Position.Y = Player.PlayerGui.FreeCam.PlaceHolder.Value.Y
head:WaitForChild("BodyPosition").Position.Z = Player.PlayerGui.FreeCam.PlaceHolder.Value.Z
print("done")
repeat wait(1) until math.floor(head.Position.X) == math.floor(Player.PlayerGui.FreeCam.PlaceHolder.Value.X) and math.floor(head.Position.Y) ==math.floor(Player.PlayerGui.FreeCam.PlaceHolder.Value.Y) and math.floor(head.Position.Z) ==math.floor(Player.PlayerGui.FreeCam.PlaceHolder.Value.Z) --This gets the head's position and matching it with my value i want it to be. I'm using math.floor in case there are any decimals.
wait(1)
print('Done!')
head.BodyPosition:Destroy()
In case you are wondering, Player is already defined. It is the player in the players list. This is in a server script if you need to know for something I don't already know.

5 comments
Instance.new("BodyPosition", head) instead of Instance.new("BodyPosition").Parent = head
Doing Instance.new("BodyPosition", head) would still do the same thing as Instance.new("BodyPosition").Parent = head. Also, using your way still does not work.
It's NOT The same thing...
whats the difference
Using :MoveTo() will move a model so maybe this will work. Put a block where you want the player to go and do this. Character:MoveTo(block.Position)