wait(1)
local plr = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input,isTyping)
local equip = plr:FindFirstChild("Equips")
local ability = equip:FindFirstChild("Ability1")
local folder = ability:FindFirstChildOfClass("Folder")
if folder then
print("ok")
local event = folder:FindFirstChild("FireEvent")
if input.KeyCode == Enum.KeyCode.Q then
event:FireServer()
end
end
end)
It's fine when I reset character for the first time, but not the first time you join. It's supposed to fire a server event, but only works when you've been in the game and died the first time. The script works, its just a problem with UIS. Does anyone know why?
