I’m forgetful, and I forgot which script fired a remote Event. Is it possible to check which script fired the event? Thanks!
You can achieve it by printing the name of the script.
print(script.Name .. " fired a remote event.")
Yes but I don’t know which script fired the event so how am I supposed to get script.Name
what is the remote event name?
You can do ctrl + shift. then search the remote event name
Your question is same to:
So basically there is only one way:
1 Like
You cant, however you can use this
local targetName = "NameOfEvent"
local function searchScripts(container)
for _, descendant in ipairs(container:GetDescendants()) do
if descendant:IsA("LuaSourceContainer") then
local source = descendant.Source
if source:find(targetName) then
print("Found in:", descendant:GetFullName())
end
end
end
end
searchScripts(game.ServerScriptService)
searchScripts(game.StarterPlayer)
searchScripts(game.ReplicatedStorage)
searchScripts(game.StarterGui)
searchScripts(game.StarterPack)
searchScripts(game.ServerStorage)
1 Like