Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

can i have an explanation to the wiring tool?[Solved]

I want to create a Lego Mindstorms system on Roblox but I want to understand the wiring tool to do so(so I can let people create their own robots, kind of like Silly Wiring).


Update: ok I think I figured out how to create a wiring part

  1. Use t = Instance.new("CustomEvent") t.Parent=game.Workspace and t = Instance.new("CustomEventReceiver") t.Parent=game.Workspace in the command line.
  2. Insert 2 parts and put the CustomEvent in one and the CustomEventReceiver in the other.
  3. Put a ClickDetector in the part with the CustomEvent in it.
  4. Put a script in both parts and in the part with the CustomEvent put in its script
sp = script.Parent
cd = sp.ClickDetector
sp.CustomEvent:SetValue(0)
cd.MouseClick:connect(function()
	sp.CustomEvent:SetValue(1)
	wait(3)
	sp.CustomEvent:SetValue(0)
end)

and in the part with the CustomEventReceiver in its script put

sp = script.Parent

sp.CustomEventReceiver.SourceValueChanged:connect(function(val)
	if val==1 then
		sp.BrickColor = BrickColor.new("New Yeller")
	elseif val==0 then
		sp.BrickColor = BrickColor.new("Medium stone grey")
	end
end)
  1. Now just connect them using the wiring tool and your done! btw 1 must mean "on" and 0 must also mean "off" for the other premade wiring models(or parts) to work with your custom wiring model(or part).

3 comments

0

Please go to building helpers on the ROBLOX website; http://www.roblox.com/Forum/ShowForum.aspx?ForumID=19

0

with the way people downvote im going to quit scripting helpers

0

i think i might

1 answer

This is not a scripting question and does not belong here.

6 comments

0

how i want to understand the tool

0

This website is for help with Lua, the programming language that Roblox Studio uses. The Wiring tool from Build Mode has nothing to do with Lua and should not be asked about here.

0

funney becuase i dont understand the lua that is in it

0

i mean that i want to modify it so i need an explanation on how the internal part of it works so i can use it for my own stuff

0

Ah, I see. This was unclear in your original post. The best way to figure it out would be to find the model and study the code.

0

well actually i think i did it

This discussion is preserved as it was. New answers, comments, and votes are closed.