Model won't move to position from a variable, but it will if it is a straight number input

replicatedStorage.Events.SpawnBoat.OnServerEvent:Connect(function(player, boat, spawnPos)
	print(spawnPos.Position)
	if boat == "Dinghy" then
		if player:WaitForChild("Inventory").Boats.Dinghy.Value == true then
			if game.Workspace.Boats:FindFirstChild(player.Name.. "'s boat") then
				game.Workspace.Boats:FindFirstChild(player.Name.. "'s boat"):Destroy()
			end
			
			local dinghy = serverStorage.Boats.Dinghy:Clone()
			dinghy.Parent = workspace.Boats
			print(spawnPos.Position)
		--	dinghy.OwnerValue.Value = player.Name
			dinghy:MoveTo(Vector3.new(-247.714, 67, -110.623))
			print(dinghy.PrimaryPart.Position)
			dinghy.Name = player.Name.. "'s boat"
		end
	end
end)

So right now this code above functions, the model moves to the position, but if i change the line to this

dinghy:MoveTo(Vector3.new(spawnPos.Position))

then the model prints as being at 0, 0, 0, which is incorrect and it isn’t at the correct position in the game, not sure why this happens as spawnPos.Position prints as the correct position, not 0, 0, 0, what should I do?

why are you making a new Vector3 when spawnPos.Position is already a Vector3. Also, save the spawnPos.Position to its own variable then print it and use it

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.