Alright, so I made a LocalScript where if someone's in a VehicleSeat and the key "P" is pressed, a brick in the Workspace will turn Blue. My script won't work though, nothing shows up in the Output or Script Analysis. Can someone please fix it? Thank you in advance.
-NightlyBasis
local uis = game:GetService("UserInputService")
script.Parent:WaitForChild("Humanoid").Changed:connect(function()
if script.Parent.Humanoid.SeatPart ~= nil then
uis.InputChanged:connect(function(input)
if input.KeyCode == Enum.KeyCode.P then
game.Workspace.BlueEvent:FireServer()
end
end)
end
end)

7 comments
I put the script in, and moved events to ReplicatedStorage, nothing happens.
Sorry for being a bit broad, make sure this is a LocalScript in StarterGui, StarterPack, or PlayerScripts
Is there a way to put it inside the VehicleSeat? This is because I'll use the inputs for functions within the car (E.G. Q is for left indicator).
No, it will not run under it.
Is there a way to make it run as a child of VehicleSeat?
Nope.
Alright, thanks for your help though