if gp then return end -- stops the function if it's being processed by something else
if key.KeyCode == Enum.KeyCode.One then
script.Parent.Parent.BackgroundColor3 = Color3.fromRGB(25, 255, 62)
script.Parent.Parent.Parent.Frame2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
script.Parent.Parent.Parent.Frame3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
script.Parent.Parent.Parent.Frame4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
script.Parent.Parent.Parent.Frame5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
The Mouse method is outdated.
No worries, my forum is being slow at the minute so my messages might appear late.
As already mentioned, it’s recommended you user UserInputService. Here’s an example of it’s use:
local UIS = game:GetService("UserInputService");
if input.KeyCode == Enum.KeyCode.Q then --// There are a list of KeyCodes you can find, even "One".
UserInputService contains many useful functions which is why I recommend switching over, and that Mouse is already deprecated so no need to use it anymore.