I have a script in a car that moves it foward for a cool cinematic ending. The problem is when I try to make the player seat in the car seat or weld the player to the car it will stay in the same position and I'm not sure what to do..
Car script:
--Some code... local a = .1 for i = 1,1000 do a = a + .01 script.Parent.Parent:SetPrimaryPartCFrame(script.Parent.Parent.Base.CFrame + Vector3.new(0,0,-a)) wait() end --Some more code..
Script to weld the player to the car:
local Weld = Instance.new("ManualWeld",game.Workspace:WaitForChild("Car").Seat) Weld.Name = "WeldPlayerToCar" Weld.Part0 = player.Character.Torso Weld.Part1 = game.Workspace.Car.Seat Weld.C0 = CFrame.new(game.Workspace.Car.Seat.Position) --Creates weld but doesn't move the player along with it.
I apreciate any kindness on helping me solving this annoying problem! ^.^
You're pretty much welding the car seat to the player, you should try it the other way around. Try this:
local Weld = Instance.new('Weld', workspace:WaitForChild('Car').Seat) Weld.Name = 'WeldPlayerToCar' Weld.Part0 = workspace.Car.Seat weld.Part1 = player.Character.HumanoidRootPart weld.C0 = CFrame.new(0,3,0)