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.

1 comment
Do you mean like ReplicatedStorage.Fire:FireServer(mouse.Hit) because you need to call the mouse by defining the player like player = game.players.Localplayer and local character = player.Character or player.CharacterAdded:Wait() then local mouse = player:GetMouse() then mouse.TargetFilter = character