ILovePotato

Free titan

Dec 16th, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1.  
  2.  
  3.  
  4. for i, v in pairs(game:GetService("ReplicatedStorage")._NETWORK:GetChildren()) do
  5. -- Check if the name contains the character '{'
  6. if v.Name:find("{") then
  7. local args = {
  8. [1] = "Titan"
  9. }
  10.  
  11. -- Check if v is a RemoteEvent and can FireServer
  12. if v:IsA("RemoteEvent") then
  13. v:FireServer(unpack(args))
  14. elseif v:IsA("RemoteFunction") then
  15. -- If it's a RemoteFunction, use InvokeServer
  16. local result = v:InvokeServer(unpack(args))
  17. print("Result from InvokeServer:", result) -- Optional: Print the result
  18. else
  19. print("v is neither a RemoteEvent nor a RemoteFunction.")
  20. end
  21. end
  22. end
Add Comment
Please, Sign In to add comment