How can i make things happend when a player is seated?

how could i make things happen when a player sits on a seat?

You could check the documentation about the Seat part. It has some examples like this one:
You can add some stuff in that script which is checking when a player used the Seat

local currentPlayer = nil

local function onOccupantChanged()
	local humanoid = seat.Occupant
	if humanoid then
		local character = humanoid.Parent
		local player = Players:GetPlayerFromCharacter(character)
		if player then
			print(player.Name .. " has sat down")
			currentPlayer = player
			return
		end
	end
	if currentPlayer then
		print(currentPlayer.Name .. " has got up")
		currentPlayer = nil
	end
end

seat:GetPropertyChangedSignal("Occupant"):Connect(onOccupantChanged)
1 Like

thank you!!! (30 letterssssssssssssss)

1 Like

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