Alright so, I’m making a Car system for my war game. It’s going well but ONE problem… when my friend tries the car out, it INSTANTLY sinks to the ground. It only happens if she’s the one driving, and the error does NOT apply to other people… I’ve been trying to figure out what’s wrong but to no avail.
As you can see here in this picture, the wheels is sinking into the ground.
This Car system i created uses Roblox physics constraints for the suspension and wheels. Similiar to the one uploaded by the official Roblox account. I checked the script like a million times, there’s nothing wrong with it and the only thing the script does is set the network ownership of the car and make the wheels spin. That’s it, it doesn’t change the collisions nor any of the suspension spring properties.
This also only seems to be happening when the networkownership is applied to that specific player (i created a delay for it, and it seems to be the case.) the line for this is just
Engine:SetNetworkOwnership(Player)
and nothing special. Any ideas on what maybe causing this, folks?
Sorry for the VERY late response, i was away from studio for a few days… but, if you still want to help here’s a piece of the script!
if IsMobile == false then
ControlStatus.Throttle = Seat.ThrottleFloat
end
ControlStatus.Steer = Seat.SteerFloat
for i,Wheel in Wheels do
if Wheel.Name == "Wheel_Turn" then
if Wheel:FindFirstChildOfClass("CylindricalConstraint") then
local Constraint = Wheel:FindFirstChildOfClass("CylindricalConstraint")
local HostAttachment = Constraint.Attachment0
if Constraint.Attachment1.Name == Wheel.Name then
HostAttachment = Constraint.Attachment1
end
local Orientation = Vector3.new(0, -ControlStatus.Steer * Settings.Stats.Steering.MaxSteerAngle, 90)
TweenService:Create(HostAttachment, TweenInfo.new(Settings.Stats.Steering.SteerSpeed), {["Orientation"] = Orientation}):Play()
end
elseif Wheel.Name == "Wheel_Push" then
if Wheel:FindFirstChildOfClass("CylindricalConstraint") then
local Constraint = Wheel:FindFirstChildOfClass("CylindricalConstraint")
local HostAttachment = Constraint.Attachment0
if Constraint.Attachment1.Name == Wheel.Name then
HostAttachment = Constraint.Attachment1
end
local MaxSpeed = Settings.Stats.MaxSpeed
if ControlStatus.Throttle < 0 then
MaxSpeed = Settings.Stats.MaxReverseSpeed
end
local MaxAngularVelocity = MaxSpeed / (Wheel.Size.Y / 2)
local AngularVelocity = ControlStatus.Throttle * MaxAngularVelocity
Constraint.AngularVelocity = AngularVelocity
end
end
end