Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with Instance.new()?

Asked by 10 years ago

Im trying to find a way in a Sb (Script builder) to create a Localscript in the character of another player

ls = Instance.new("Localscript"),game.Workspace.TehPlayer
ls.Disabled = false
ls. ???

How would I add code to the script? Or what if I wanted to do a regular script instead of local?

3 answers

Log in to vote
1
Answered by
jav2612 180
10 years ago

If you want to make a script builder, your going to need to have an original script with the syntax something like: loadstring(script:findFirstChild("Source").Value)() and then have a StringValue inside that script named "Source" This script should be disabled.

Then you can copy that script, change the Value of the "Source" string and enable the script.

If you want to make a localscript you can do the same thing, but put a ObjectValue with the Player that created the script, and then in the original script you can parent the script to that Player using the ObjectValue.

0
Thank you. GenaralMustachi 5 — 10y
Ad
Log in to vote
1
Answered by 10 years ago

I'm just going to fix that script up.

local ls = Instance.new("LocalScript", game.Workspace.PLR)
ls.Disabled = false
Log in to vote
-1
Answered by
painzx3 43
10 years ago

Well if you want to use SB with your own scripts, I suggest you make them in studio first to see if there are errors. If that doesn't work, it's possibly due to the creator preventing players from adding localscripts into OTHER players.

Answer this question