What line of code would I use to to Fire A Remote Event using User Input Service after the character presses MouseButton1?
I have so far this:
local gun = script.Parent local UIS = game:GetService("UserInputService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local fireEvent = ReplicatedStorage:WaitForChild("Fire") local function onInputBegan(input, gameProcessed) if input.UserInputType == Enum.UserInputType.MouseButton1 then end end
line 8 is the code I am missing but i'm unsure what to use.
fireEvent:FireServer()