Hi
I want to make a leaning system so that as a passenger you can lean out and shoot. I made the part which detects whether a gun is equipped while seating in a seat and also made the gun. But I am stuck on the rotation part, the player has to rotate to lean our of the window but when I rotate humanoid root part it rotates the seat and the car along with it, how would I fix it?
code snippet:
seat:GetPropertyChangedSignal("Occupant"):Connect(function()
if seat.Occupant then
proximityPrompt.Enabled = false
local seater = game.Players:FindFirstChild(seat.Occupant.Parent.Name)
local holdingGun = seater:FindFirstChild("holdingGun")
holdingGun.Changed:Connect(function()
if holdingGun.Value == true then
-- holding gun
else
-- not holding gun
end
end)
else
proximityPrompt.Enabled = true
end
end)