Remote functions in the same script

Is it possible to use a remote thats inside a script? Like this


game:GetService("ReplicatedStorage").Damage.ragdoll.OnServerEvent:Connect(function(player)
--fire remote below
end)



game:GetService("ReplicatedStorage").Remotes.ragdoll.OnServerEvent:Connect(function(player)

end)

So the top one would be like damage and the bottom would be ragdoll. Just a quick question. I would look it up but i don’t really know how to explain it

You said… “Just a quick question” But I do not see a question to answer.

Also, are you hoping to fire a remote serverside?Would the remote your firing be client side( :FireClient() or :FireClients())

First line of text was a question.

and yeah i think so

My bad I scrolled right pass that…

You can fire a remote in a script of course but only server to client via RemoteEvent | Roblox Creator Documentation

instead of firing the remote below, you can do something like this:

local function OnEventFire()
	-- do the second event code here
end

game:GetService("ReplicatedStorage").Damage.ragdoll.OnServerEvent:Connect(function(player)
    -- do the damage code here
    OnEventFire()
end)



game:GetService("ReplicatedStorage").Remotes.ragdoll.OnServerEvent:Connect(function(player)
   OnEventFire()
end)