So i have scripted a car, it works fine and so! But the only thing is that the car is a mesh so in first person it look really silly... I wanna script so when a player sits in the car the CameraMinZoomDistance is 20.
I thaught of occupant as a good thing to use, but i don't know how to access a players CameraMinZoomDistance via a script in the VehicleSeat..
Can somebody help me?
Here is the script:
local Seat = script.Parent -- Path to seat
Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
if Seat.Occupant ~= nil then
local Char = Seat.Occupant.Parent
end
end)

7 comments
Yo it is, dope.
where is the script gonna be, and is it local script or server script?
LocalScript in StarterCharacterScripts works
Actually don't do that. Script in ServerScriptService. People can exploit local scripts or whatever.
ok!
is there anyway to make the camera go back to normal when player has left the seat?
Yes, I'll edit that into the post. Also, you should make the server script inside each seat if you plan on having multiple. It was late when I commented so I wasn't really thinking