when i test it, it wont work
--when you sit you disable a script game:GetService('Players').PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid").Sit:Connect(function() script.CameraScript.Disabled = true end) end) end)
--when you stand you enable a script game:GetService('Players').PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid").stand:Connect(function() script.CameraScript.Disabled = false end) end) end)
Try this:
game:GetService("Players").PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid"):GetPropertyChangedSignal("Sit"):Connect(function() if character.Humanoid.Sit then script.CameraScript.Disabled = true else script.CameraScript.Disabled = false end end) end) end)
This code works for me when I test it.
You only need one PlayerAdded function. You can put all your logic in there. Also, the event to see if a player is seated is 'Seated' , not 'Sit' Seated has a parameter that is true/false depending on if the player is seated or not.
game:GetService('Players').PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid").Seated:Connect(function(isSeated) if(isSeated)then print("Player is seated") script.CameraScript.Disabled = true else print("Player is NOT seated") script.CameraScript.Disabled = false end end) end) end)