Help, I'm making an rc car (controlled from a vehicleseat). The rc car works but the camera function doesn't. The player's camera does not focus on the car. No errors are logged. The localscript is parented inside the vehicleseat. The reasons I'm not using game.workspace or findfirstchild for the object because there might be multiple cars or the vehicle might be parented to something else. I'm worried about there being multiple cars because that could cause conflict and it could focus on something different.
Camera = game.Workspace.CurrentCamera
Object = script.Parent.Parent["MINIWORLD: 1980 Toyota 4x4 SR5"].BODY.Part
Player = game.Players.LocalPlayer.Character.Humanoid
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid")
wait()
if h.Sit == true then
Camera.CameraSubject = Object
Camera.CameraType = "Track"
end
end
script.Parent.Touched:connect(onTouched)
EDIT: I found something out. For some reason the camera keeps on being set to the vehicleseat. Why is this happening? I did NOT set it to focus on the vehicleseat.
