Why is my script not working?

  1. What do you want to achieve? Make a moving boat that takes players with it instead of making players have to keep walking

  2. What is the issue? it is not pushing the players as its moving

  3. What solutions have you tried so far? Youtube

wait(20)
local debounce = false
local model = workspace.Ship -- Yeah the model

for i=1,350,0.001 do
	game.Workspace.Ship.o77.Touched:Connect(function(player)




		player.Character:FindFirstChild("Humanoid"):MoveTo(Vector3.new(5.285, 50.351, 63.449))


	end)

	local cframe = model.PrimaryPart.CFrame
	local newframe = cframe:Lerp(cframe*CFrame.new(0,0,-0.032311),i/0.213123)
	model:SetPrimaryPartCFrame(newframe)
	wait(0.01)

end

1 Like

Use “HumanoidRootPart” instead of “Humanoid”, the humanoid is not an object.

Uh, I think you may be mistaken?

1 Like

Not 100% sure but wouldn’t this cause a memory leak? You’re making a lot of connections here and they aren’t being disconnected.

use body position instead of lerping it. it will be a lot smoother and will move the player

1 Like

Oh, my bad. I thought it was just setting the position.

1 Like