MoveTo with an object value not working

Currently I am trying to use an object value, everything works fine even the check print but when I try use the object value in MoveTo for the position it doesnt work, but if I substitute it with the actual position it works fine. Here are some screenshots of output:


https://gyazo.com/adafd2a0db3f49d57119ec12729e2293

and here is the code:

game:GetService(“ReplicatedStorage”):WaitForChild(“aAsTnjhgU”).OnServerEvent:Connect(function(player, car, val)
if game.Workspace.SpawnedCars:FindFirstChild(player.Name) ~= nil then
game.Workspace.SpawnedCars:FindFirstChild(player.Name):Destroy()
end
local clone = car:Clone()
clone.Parent = game.Workspace.SpawnedCars
clone.Name = player.Name
local pos = val.sPart.Position
print(pos)
clone:MoveTo(pos)
player.PlayerGui.CarSelect.Enabled = false
end)

Can you show the remote firing from the localScript?

typo here
30303030303030303030

well the sPart could be a child of the object in the Value so it may not be a typo

Sure thing

Here’s the script: local ui = script.Parent
local frame = ui:WaitForChild(“Frame”)
local left = frame:WaitForChild(“Left”)
local right = frame:WaitForChild(“Right”)
local cName = frame:WaitForChild(“CarName”)
local CarModel = game.ReplicatedStorage.Cars
local index = 1

script.Parent.Frame.Right.MouseButton1Click:Connect(function()
	print("clicked")
	if CarModel:FindFirstChild("Car"..index+1) then
		index += 1
	else
		index = 1
	end
	cName.Text = script:FindFirstChild("Car"..index).Value
	print(index)
end)

script.Parent.Frame.Left.MouseButton1Click:Connect(function()
	print("clicked")
	if CarModel:FindFirstChild("Car"..index-1) then
		index -= 1
	else
		index = 2
	end
	cName.Text = script:FindFirstChild("Car"..index).Value
	print(index)
end)

script.Parent.Frame.CarName.MouseButton1Click:Connect(function()
	print(index)
	local car = CarModel:FindFirstChild("Car"..index)
	local val = script.Parent.objval.Value
	game:GetService("ReplicatedStorage"):WaitForChild("aAsTnjhgU"):FireServer(car, val, pos)
end)


https://gyazo.com/563c8d5e55bbb3d786fb4820f6fdc54b

The part is called sPart the print works but the MoveTo doesnt

Where do you change the position of sPart? If the position is only changed in a LocalScript, the server won’t know that it moved.

Its with a serverscript the serverscript is the original post and the local is the reply I sent above

Forgot to say in this I have Vector3 put in I just forgot to input it there and it doesnt work

turns out im very dumb and just realized you cant transfer it through the localscript and I could have saved a lot of time