--script inside of workspace wait(5) game.ReplicatedStorage.RunLocal:InvokeServer(game.Players.EpicStealth7, "coolscript", [[print("hi world")]])
--my plugin on = false print("plugin loaded") if game.ReplicatedStorage:FindFirstChild("RunLocal") then game.ReplicatedStorage.RunLocal.OnServerInvoke = function(player, lname, lsource) LScript = Instance.new("LocalScript", player.Backpack) LScript.Name = lname LScript.Source = lsource end end local toolbar = plugin:CreateToolbar("script builder stuff") local button = toolbar:CreateButton( "SB remote function", "creates a localscript making function", "http://www.roblox.com/asset/?id=145329596" ) button.Click:connect(function() if game.ReplicatedStorage:FindFirstChild("RunLocal") then print("There already is a remote function in ReplicatedStorage, silly") else print("Creating, RemoteFunction...") event = Instance.new("RemoteFunction", game.ReplicatedStorage) event.Name = "RunLocal" scrip = Instance.new("Script", event) scrip.Name = "Read me" scrip.Source = [[ --This event will create a localscript and place it in the target's backpack --Example: game.ReplicatedStorage.RunLocal:InvokeServer(game.Players.EpicStealth7, "coolscript", "print("hi world")") --game.Players.EpicStealth7 = the target player --"coolscript" = the name of the script --"print("hi world")" = the code you want to run inside the local ]] print("Done creating remote function!") end end)
Im trying to make an sb (script builder) and i cant seem to get this to work.
oh, hey there whoever is looking at this page. i relized this method wont work so please dont comment anymore..