How to not count this part in my car?

Hey there!

I know the title is a bit unclear but I don’t know how to word my question properly so I will show you.

Recently, I was making this light system for my car so people can see in the dark. The lights are two parts in front of my car. Since these parts are welded to the main body, the camera acts a bit weird:

Without the lights:
https://drive.google.com/file/d/13N5xQoaSWwW5aeDARgYh7kJ2l8TmEfcf/view?usp=sharing

With the lights:
https://drive.google.com/file/d/1h77xAmM5zoT48KRT1RiKuzvYImnjldo1/view?usp=sharing

See how the camera acts weirdly?

My question is, how do I get make the camera focus on the centre of the car body rather than the entire model?

Thanks!

2 Likes

perhaps share ur camera script , cause its prob to do with that it focusing on a different part/primary part of ur car cause the video doens’t really seems to be different when i look at it.

2 Likes

I am using the Roblox default camera script that comes with the vehicle seat.

1 Like

Can you send it? I can’t seem to find the script.

1 Like

I do not know where the script is. I hope to find it too.

just use the search bar in the explorer window and type “Script”

Did you ever figure this out? Having the same issue.

I don’t know of any way to fix this besides using attachments instead of parts. There might be a hacky solution I don’t know though.

1 Like

Just found a solution. When the player enters the vehicle seat you can change their camera to focus on the player’s humanoid instead of the vehicle seat (which roblox does by default). This is done through a LocalScript.

local player = game.Players.LocalPlayer;
local camera = workspace.CurrentCamera;

player.Character.Humanoid.Changed:Connect(function()
    if player.Character.Humanoid.Sit then
        camera.CameraSubject = player.Character.Humanoid;
    end
end

I use a custom vehicle system so my script is different but the above should work for any basic vehicle

I just used a hitbox around the car. It works that way.

1 Like