So long story short I've been trying to find a way to find the character of a person who's been sat on a seat usually it ends up in an error with it returning as a nil. I've already tried using seat.Occupant and the lot really and I'm a little lost.
I need to find the character for the seat to be able to change their max health and health.
Any help?
Ok so you need to find out what is touching the part. So
local seat = script.Parent -- or whatever it is seat.Touched:Connect(function(hit) -- function to see who touched local char = hit.Parent -- hit is the part that touches the leg if char then -- checks to see if character is there print(char.Name) -- prints the name end end)