Making a Player ride a Bike that moves infinitely

Hello! I’m currently creating a race system where a cloned Character rides a bike and it moves infinitely… The problem I’m facing is how could I force the cloned Character to ride the bike? I’m currently using a Local-Script (module to be specific) which means I can’t use the seat property nor able to move the Bike with the player… If anyone could help me with this problem then it’d be highly appreciated.

Code:

function module.StartRace(Stand) 
	if Running == false then 
		Running = true
		
		
		local PlayerCharacter = Player.Character
		
		PlayerCharacter.Archivable = true
		Stand.Friend.Archivable = true

		local CharacterClone = PlayerCharacter:Clone()
		local NPCClone = Stand.NPC:Clone()
		
		
		NPCClone.Parent = workspace.Race.Characters
		NPCClone.Parent = workspace.Race.Characters
		
		local PlayerBike = workspace.RedBike:Clone()
		PlayerBike.Parent = workspace.Race.Characters
		
		NPCClone.PrimaryPart.CFrame = workspace.Race.Objects.NPCPos.CFrame
		PlayerBike:PivotTo(workspace.Race.Objects.PlayerPos.CFrame)

		PlayerBike.Seat:Sit(PlayerCharacter.Humanoid) -- Doesn't work..

	end
end
2 Likes

Any help would be greatly appreciated.

Is there a way to use Seats on the client? I still haven’t figured out a solution…

You should use remotes or server scripts to start the race. That way the bike and npc will be seen for everyone and function properly.

I believe seats only work for npcs on the server-side, too.

Hello, thanks for your reply. Unfortunately, I’m not trying to display the entire race for all players. Only the LocalPlayer that started the race. I’m trying to make the Player ride the bike and the bike would move infinitely.

Is PlayerCharacter.Humanoid nil? Is there also any errors in the output?

No it’s not and there isn’t. Simply you can’t force a Humanoid to sit in local scripts. That’s why I’m trying to find a better way.

I’ve decided to weld the Model to the Player. Thanks for everyone trying to help.

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