Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Script that shows name of the player when they sit and get up from a certain seat using surface gui?

Im confused, i've tried many times and every thing I do fails

1 answer

✓ Accepted answer

Hi you can check who is sitting by checking the property occupant.

So 1st you want to put a script inside the seat, obviously.

then you can insert this code which uses the property occupant to check who is in the seat:

local Seat =  script.Parent 

Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
	if Seat.Occupant ~= nil then
		local character = Seat.Occupant.Parent
		print(character.Name)
	end
end)

Hope this helped!

Any questions? Just ask!

This discussion is preserved as it was. New answers, comments, and votes are closed.