As the title says I am basically writing a first-person-camera script that should only activate when in a ****vehicle seats**** instead of a regular seat. I am doing this because I don't want players sitting in a café chair to be forced into first person, only when they are driving and are the designated driver because I have guns that lets players do drive-bys but they get broken with this camera script.
The method that the script uses to detect player sitting is using character states i.e. platform stand, sitting, running, etc which is ineffective at separating VehicleSeats from regular seats.
That section of code looks like this:
char:WaitForChild("Humanoid").Changed:connect(function(val) if (val == "Sit" and char.Humanoid.Sit == true) or (val == "PlatformStand" and char.Humanoid.PlatformStand == true) then seatCam() end end)
It's really easy to make a general detection for playerstates like sitting but it does not help me separate VehicleSeats from regular seats. So how would I go about checking if the player is in a certain type of seat?
Thanks.