How to detect when player sits down

  1. What do you want to achieve? Keep it simple and clear!
    A seat that detects when a player sits down without using “Touched”
  2. What is the issue? Include screenshots / videos if possible!
    I cant use “Touched” because that will lead to game breaking glitches.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    DevForum
1 Like
1 Like

use the humanoid.Seated event to get the “Sit” property on the humanoid or using the GetPropertyChangedSignal on a seat if you want to make it detect only one seat

local Seat =  script.Parent -- path to seat

Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
	if Seat.Occupant ~= nil then
		local Char = Seat.Occupant.Parent
		Char["HumanoidRootPart"].Anchored = true
        -- Can also set their jump power if wanting, your preference
	end
end)
humanoid.Seated:Connect(function(boolean: seated,instance: seat)
 -- function here
end)

also please replace the placeholders for the message

Sources:
GetPropertyChangedSignal documentation: Instance | Documentation - Roblox Creator Hub

Humanoid.Seated documentation: Humanoid | Documentation - Roblox Creator Hub

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.