local motorFR = kart.Wheels.AxelFR.Motor
local motorFL = kart.Wheels.AxelFL.Motor
local motorRR = kart.Wheels.AxelRR.Motor
local motorRL = kart.Wheels.AxelRL.Motor
local servoFR = kart.Wheels.ServoFR.Servo
local servoFL = kart.Wheels.ServoFL.Servo
“Wheels” is a model and the axels and servos are parented to “Wheels”
local motorFR = kart:WaitForChild("Wheels"):WaitForChild("AxelFR").Motor
local motorFL = kart.Wheels:WaitForChild("AxelFL").Motor
local motorRR = kart.Wheels:WaitForChild("AxelRR").Motor
local motorRL = kart.Wheels:WaitForChild("AxelRL").Motor
local servoFR = kart.Wheels:WaitForChild("ServoFR").Servo
local servoFL = kart.Wheels:WaitForChild("ServoFL").Servo
If this doesn’t work, can you please send a screenshot of explorer with the descendants (which you’re calling) of the kart.
local gui = script.Parent
local seat = gui.Seat
local kart = script.Parent.Parent.Parent.Parent.Parent
local runService = game:GetService("RunService")
local motorFR = kart:WaitForChild("Wheels"):WaitForChild("AxelFR").Motor
local motorFL = kart:WaitForChild("Wheels").AxelFL.Motor
local motorRR = kart:WaitForChild("Wheels").AxelRR.Motor
local motorRL = kart:WaitForChild("Wheels").AxelRL.Motor
local servoFR = kart:WaitForChild("Wheels").ServoFR.Servo
local servoFL = kart:WaitForChild("Wheels").ServoFL.Servo
print(motorFR.AngularVelocity)
local throttle = 1
local steer = 0
function Init()
motorFR.MotorMaxTorque = 10000
motorFL.MotorMaxTorque = 10000
motorRR.MotorMaxTorque = 10000
motorRL.MotorMaxTorque = 10000
while runService.RenderStepped:Wait() do
Update()
end
end
function Update()
throttle = 1
motorFR.AngularVelocity = 500 * throttle
motorFL.AngularVelocity = -500 * throttle
motorRR.AngularVelocity = 500 * throttle
motorRL.AngularVelocity = -500 * throttle
end
Init()
It’s moved to the playergui in the chassis script here:
function PlayerConnect(weld)
if weld.Name == "SeatWeld" then
local char = weld.Part1.Parent
local plr = game.Players:FindFirstChild(char.Name)
if plr ~= nil then
local clone = script.SeatGui:Clone()
clone.Parent = plr.PlayerGui
end
end
end
For future reference for people who may run into a similar error.
I don’t know how I overlooked this in the original post, but the reference to kart was yielding because the client wasn’t given enough time to locate the resource (the kart).