Whenever the script.Parent (SeatPart) has a child added, I get the SeatPart's SeatWeld and get that weld's Part1. If that part's Parent is a character of a player, it prints "A player sat down!". Is there a better way to define the player that sat down on the part?
Here's the code:
script.Parent.ChildAdded:Connect(function(part)
print("Sat down!")
local part = script.Parent.SeatWeld.Part1
local plr = part.Parent
if game.Players:GetPlayerFromCharacter(plr) then
print("A player sat down!")
end
end)
