Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

OK my last thread made me relize I'm a ***** and i found the problem line how do i fix it

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!
Status
Not open for further replies.

Snakeskin

Member
Reputation: 0 / 0 / 0
Oct 1, 2020
39
2
8
Roblox
newcool675
ok so like an ***** i forgot that the output wants to be my friend and i forgot to open it but I finally did and found the problem the problem is on a local script this is what the output says "Keycode is not a valid member of InputObject "InputObject""

This is my code and the problem line

My code and the problem line:
local Userinputservice = game:GetService("UserInputService")

local player = game.Players.LocalPlayer

local character = player.Character or player.CharacterAdded:Wait()

local debounce = false


Userinputservice.InputBegan:Connect(function(Input , InTyping)
    if not InTyping then
        if not debounce then
            
            debounce = true
            
            if Input.Keycode == Enum.KeyCode.R then
                
                game.ReplicatedStorage.Firebeam:FireServer()
            end
            
            wait(7)
            debounce = false
        end
    end
end)

I've tried deleting ".Keycode" on line 16 (The problem line) and there was no errors but the script did nothing why and how do i fix this?
 

ElHomburgerGuy

If you won't let yourself fail, you won't improve
Moderator
Reputation: 5 / 0 / 1
Apr 24, 2019
5,888
14
1,882
113
Anonymous in the USA
Roblox
PieroWasTaking
Discord
Piero#5261
Good job! But I do recommend you go to your other thread and make sure to let people know the problem is fixed. Just incase no one reads this thread prior. ;)
 

CallMeKY

Moderator
Ultra
Reputation: 5 / 0 / 0
Feb 25, 2018
1,442
26
559
113
Maine, USA
Roblox
CallMeKY
Discord
CallMeKY#5012
ok so like an ***** i forgot that the output wants to be my friend and i forgot to open it but I finally did and found the problem the problem is on a local script this is what the output says "Keycode is not a valid member of InputObject "InputObject""

This is my code and the problem line

My code and the problem line:
local Userinputservice = game:GetService("UserInputService")

local player = game.Players.LocalPlayer

local character = player.Character or player.CharacterAdded:Wait()

local debounce = false


Userinputservice.InputBegan:Connect(function(Input , InTyping)
    if not InTyping then
        if not debounce then
           
            debounce = true
           
            if Input.Keycode == Enum.KeyCode.R then
               
                game.ReplicatedStorage.Firebeam:FireServer()
            end
           
            wait(7)
            debounce = false
        end
    end
end)

I've tried deleting ".Keycode" on line 16 (The problem line) and there was no errors but the script did nothing why and how do i fix this?
I replied to your other thread. The issue you're describing here is that "KeyCode" isn't properly capitalized (you can see how it's supposed to be with the enumeration right next to it), but there are several things I changed in both of your scripts.
 
Status
Not open for further replies.