I made a script that on "f" pressed turns on SpotLight, the problem is when I use key == "f" it doesn't work and when I use key:byte() == 50 (etc.) it does.. Here's script
script.Parent.ChildAdded:connect(function() if mouse == nil then Player = game.Players.LocalPlayer mouse = Player:GetMouse() end mouse.KeyDown:connect(function(key) local Left = script.Parent.Parent.Lights.FL.FLL local Right = script.Parent.Parent.Lights.FR.FRL key = key:lower() if key == "f" and Left.Enabled == false then Left.Enabled = true Right.Enabled = true if key == "f" and Left.Enabled == true then Left.Enabled = false Right.Enabled = false end end end) end)
May I ask what this script is in? Thank you. Please give me it's parents and the classname of (all) parent(s).
Yeah this is an Car, here you go with Parents
Car -VehicleSeat --Lights -Body -Lights --FL ---FLL --FR ---FRL
(Srri Im a bit confused with this site, Im new here)