I'm currently trying to make a system where you an set the direction with Keybinds: R (Forward) F (Neutral) and V (Reserve) Nothing happens. I tried doing print("Test") but It didn't work either.
I'll preferably use normal script but I aslo tried it with local script.
Can anyone help me?
local UIS = game:GetService("UserInputService")
local seat = script.Parent
local F = script.Parent.Forward
local N = script.Parent.Neutral
local R = script.Parent.Reverse
while seat.Occupant ~= nil do
UIS.InputBegan:Connect(function(input, gameProcessedEvent)
if input.UserInputType == Enum.UserInputType.Keyboard then
local key = input.KeyCode
if key == Enum.KeyCode.R then
if F == false then
F.Value = true
R.Value = false
N.Value = false
else
F.Value = false
R.Value = false
N.Value = true
end
elseif key == Enum.KeyCode.V then
F.Value = false
R.Value = true
N.Value = false
else
F.Value = false
R.Value = false
N.Value = true
end
elseif input.KeyCode == Enum.KeyCode.F then
N.Value = true
F.Value = false
R.Value = false
end
end)
wait(0.1)
end
Thanks in advance

3 comments
Thanks but how do I make it activate a bool value when pressing the key?
Instead of printing in the script inside the seat you can have it set your bool values, and then set them to false when the key gets released again. I'll edit my answer so you can see what I mean.
That somehow doesn't work either, even as a local script.