Now this is truly weird, lately i am very confused and very angry about this one SMALL issue about a localscript i made.
So basically, it has 0% runtime in script perfomance tab, no activity whatsoever, 0 prints and EVERYTHING IS STILL IN A CORRECT SYNTAX.
local plrs = game:GetService("Players")
local reps = game:GetService("ReplicatedStorage")
local cas = game:GetService("ContextActionService")
local uis = game:GetService("UserInputService")
local runs = game:GetService("RunService")
local plr = plrs.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local modules = reps.modules
local main = require(modules.main).new()
local uisTable = {
[Enum.KeyCode.R] = reload,
[Enum.UserInputType.MouseButton1] = fire,
[Enum.UserInputType.MouseButton2] = aim,
}
function handleInput(input, gpe)
if gpe then return end
local action = uisTable[input]
if action then
action()
else
warn("Invalid input.")
end
end
function onUpdate(dt)
main:update(dt)
print("idkman")
end
function reload()
print("RELOAODOADOADOAODAOAO")
main:reload()
end
function fire()
print("FIRIIRIRIRIRIEIIEIEIEIEI")
main:fire()
end
function aim()
print("AIMMMMMMMM")
main:aim()
end
function equip()
print("YEYEYEYYEYEYEYYEYEYE")
main:equip()
end
function unequip()
print("NNNONOONONONONOONONONONONOON")
main:unequip()
end
char.ChildAdded:Connect(function(child)
if child:IsA("Tool") then
equip()
uis.InputBegan:Connect(handleInput)
uis.InputEnded:Connect(handleInput)
end
end)
char.ChildRemoved:Connect(function(child)
if child:IsA("Tool") then
unequip()
end
end)
runs:BindToRenderStep("vmRender", Enum.RenderPriority.Camera - 1, onUpdate)
is this actually a real bug or a rookie mistake because i can’t even find where the bug comes from.
Please help