Please help i can't tell if it's roblox issue or my script

I am trying to find out why my module script stops me from sitting in the seat if i just place the boat in workspace it let’s me sit in it without the script but if i use the script to tp me to sit in it i just can’t sit even if i walk on the seat.

if you find any errors and would like to rewrite then for me i would really love if you could i have been trying to fix it for 2 days i’m very lost please and thank you!


local SpawnBoat = {}

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")

local Boat = ReplicatedStorage.Boats.Boat

function SpawnBoat:SpawnPlayersBoat(Player1, Player2)
	if not Player1.Character or not Player2.Character then
		warn("One or both players don't have a character!")
		return
	end

	local currentboat = Boat:Clone()
	currentboat.Parent = Workspace.PlayersBoats
	currentboat.CFrame = Workspace.FinalBoatSpawn.CFrame

	local drivePart = currentboat.Drive
	local steerPart = currentboat.Steer

	local humanoid1 = Player1 and Player1.Character and Player1.Character:FindFirstChildOfClass("Humanoid")
	local humanoid2 = Player2 and Player2.Character and Player2.Character:FindFirstChildOfClass("Humanoid")

	if humanoid1 then humanoid1.WalkSpeed = 0 end
	if humanoid2 then humanoid2.WalkSpeed = 0 end

	task.wait(1)

	if Player1.Character and Player1.Character.PrimaryPart then
		Player1.Character.PrimaryPart.CFrame = drivePart.CFrame
	end
	if Player2.Character and Player2.Character.PrimaryPart then
		Player2.Character.PrimaryPart.CFrame = steerPart.CFrame
	end

	if humanoid1 then humanoid1.WalkSpeed = 16 end
	if humanoid2 then humanoid2.WalkSpeed = 16 end
		
	end

return SpawnBoat
1 Like

Use VehicleSeat:Sit to manually seat players

i will give that a try and let you know how it goes

did not work: Watch Sail Together [2 Player Obby] - Roblox Studio 2025-02-12 18-39-35 | Streamable

Do not teleport the players. Just seat them. If that’s what you’re doing now, send your updated code

i added the sit() like this

drivePart:Sit(humanoid1)
steerPart:Sit(humanoid2)

Do not continue to teleport the players

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