-
What do you want to achieve? To define the player for the remote event to execute.
-
What is the issue? I can’t find a way to specify the player that got out of the seat.
-
What solutions have you tried so far? I have searched everywhere throughout the DevForum and even other websites and I couldn’t find anything.
Script:
local Seat = game.Workspace.Chair.Seat
local RemoteEvent = game.ReplicatedStorage.RemoteEvents.CamSeat
local RemoteEvent2 = game.ReplicatedStorage.RemoteEvents.PlayerCam
Seat.Changed:Connect(function()
if Seat.Occupant ~= nil then
local Player = game.Players:GetPlayerFromCharacter(Seat.Occupant.Parent)
RemoteEvent:FireClient(Player)
else
local Player = game.Players:GetPlayers()
RemoteEvent2:FireClient(Player)
end
end)
Basically I want a remote event to execute when the player gets out of the seat, and the only way I know how is to specify the player. But I can’t because the only way to specify them is to see if the seat is occupied by said player (which I can’t do since the player got out of the seat)
I don’t know any other ways to execute the remote events. But as always, any help is very much appreciated!