Answered by
5 years ago Edited 5 years ago
There is a humanoid event just for this called seated:
1 | local player = game:GetService( 'Players' ).LocalPlayer |
2 | local character = player.Character or player.CharacterAdded:Wait() |
3 | local humanoid = character:WaitForChild( 'Humanoid' ) |
5 | humanoid.Seated:Connect( function (active) |
6 | player.PlayerGui.TestingGUI.TextBox.Visible = active |
Put this in a local script in StarterGui.
You could also make this into a server script pretty easily.
More information on the seated event: https://developer.roblox.com/en-us/api-reference/event/Humanoid/Seated