Hey, UserInputService won’t work.
Local script:
uis.InputBegan:Connect(function(key, gameProcessed)
if (not gameProcessed) then
if key == Enum.KeyCode.R then
script.Parent.reloadGun:FireServer()
end
end
end)
Hey, UserInputService won’t work.
Local script:
uis.InputBegan:Connect(function(key, gameProcessed)
if (not gameProcessed) then
if key == Enum.KeyCode.R then
script.Parent.reloadGun:FireServer()
end
end
end)
you forgot to type in .KeyCode:
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(key, gameProcessed)
if (not gameProcessed) then
if key.KeyCode == Enum.KeyCode.R then
script.Parent.reloadGun:FireServer()
end
end
end)
if key.Keycode == Enum.KeyCode.R