I really don't want to make a bunch of remote events. How would I make the script know where which script fired it?
When you fire a remote event, you can put strings, integers or anything in them example:
RemoteEvent:FireServer('hello', 1, true)
And in the script that receives the event, you can do this:
RemoteEvent.OnServerEvent:Connect(function(player, string, integer, bool) --you have to add --player at the start or it wont work print(string) --output will be "hello" print(integer) -- output will be 1 print(bool) --output will be true end)
With all that, you can do this:
--script RemoteEvent.OnServerEvent:Connect(function(player, scriptname) if scriptname == 'script1' then print('hello') end end)
Note: if you want to do it from the server to the client, you have to first do: FireClient() instead of FireServer() and second, you have to include the player in the FireClient()'s brackets example: FireClient(game.Players.jedistuff2, 'script1')