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
- Use
t = Instance.new("CustomEvent") t.Parent=game.Workspaceandt = Instance.new("CustomEventReceiver") t.Parent=game.Workspacein the command line. - Insert 2 parts and put the CustomEvent in one and the CustomEventReceiver in the other.
- Put a ClickDetector in the part with the CustomEvent in it.
- 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)
- 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
Please go to building helpers on the ROBLOX website; http://www.roblox.com/Forum/ShowForum.aspx?ForumID=19
with the way people downvote im going to quit scripting helpers
i think i might