game:GetService('UserInputService').InputBegan:Connect(function(InputObject, gameProcessedEvent)
if gameProcessedEvent then return end
if InputObject.KeyCode == Enum.KeyCode.F7 then
script.Parent.RemoteEvent:FireServer()
end
end)
So I’ve written this code, only the F7 key is not working. How can i fix it?
F7 seems to be occupied
Use Ctrl + F7 in-game to open performance statistics
So the code might look like this:
game:GetService('UserInputService').InputBegan:Connect(function(InputObject, gameProcessedEvent)
if InputObject.KeyCode == Enum.KeyCode.F7 then
script.Parent.RemoteEvent:FireServer()
end
end)