Ahoy there! This is my first ever topic on the roblox devforum, nice to meet/work with you all.
Before I explain the problem, here’s some context behind what the script does:
I’ve got a plane with seats. When the plane is about to take-off, I’m trying to make sure that any seated player or player that sits down after this certain moment in time, can no longer stand back up and gets a GUI appearing on their screen explaining why. This would last until I fire the event again. For additional context, the player can only stand up using a proximity prompt, so on the client side of things, I’m disabling the prompt.
My issue is that whenever I try to identify who the player is, and then do :FireClient(), I get an error saying:
FireClient: player argument must be a Player object
The script is stored under the plane model in the workspace (it’s a server script not a local script and I’m trying to avoid making another script to save clutter and a headache). The folder only contains seats.
for _,v in pairs(seatsFolder:GetChildren()) do if v.Occupant then local player = v.Occupant.parent print(player) staySeatedEvent:FireClient(player) end end
Any help is appreciated!