What do you want to achieve? I want to disable camera collision of parts when seated
What is the issue? I have a plane and im using the cm32 plane kit, when i sit on the pilot seat the camera mode switches to attach. But, i have a problem there are parts on the way of the camera. I have tried to disable collision on the parts and it worked. But i want the parts to be still cancollide true for the passengers.
local Character = script.Parent
local Player = game.Players:GetPlayerFromCharacter(Character)
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid:GetPropertyChangedSignal("Sit"):Connect(function()
if Humanoid.Sit == true then
Player.DevCameraOcclusionMode = Enum.DevCameraOcclusionMode.Invisicam
else
Player.DevCameraOcclusionMode = Enum.DevCameraOcclusionMode.Zoom
end
end)
local SeatName = "CoolSeat"
local Character = script.Parent
local Player = game.Players:GetPlayerFromCharacter(Character)
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid:GetPropertyChangedSignal("Sit"):Connect(function()
if Humanoid.Sit == true and Humanoid.SeatPart.Name == SeatName then
Player.DevCameraOcclusionMode = Enum.DevCameraOcclusionMode.Invisicam
else
Player.DevCameraOcclusionMode = Enum.DevCameraOcclusionMode.Zoom
end
end)