I’ve made a code that should fire an Event when a Key is pressed using ContextActionService but it doesn’t work at all, I don’t know what the issue could be and if someone could help me i’d be very thankful.
Here’s the code:
local Player = game.Players.LocalPlayer
local rep = game:GetService("ReplicatedStorage")
local ContextActionService = game:GetService("ContextActionService")
local ExitSeatEvent = rep.RemoteEvents:WaitForChild("ExitSeat")
local function exitSeat()
ExitSeatEvent:FireServer(true)
end
ContextActionService:BindAction("exitSeat", exitSeat, true, "Y")