|
| 13 Aug 2013 04:03 PM |
Im Editting a copy tool so that when u copy the brick it changes the color to a random one.
Im not getting it to work, help. |
|
|
| Report Abuse |
|
|
Salinas23
|
  |
| Joined: 28 Dec 2008 |
| Total Posts: 37142 |
|
|
| 13 Aug 2013 04:08 PM |
I would need to see the script to help you. Post it here please.
==Salinas23, LMaDer since August 2012! Scripter since July 2013! |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2013 04:10 PM |
debounce = false local vPlayer = game.Players.LocalPlayer local SBox = Instance.new("SelectionBox") local Tool = script.Parent;
local Select local Orig local Dragger
function onButton1Down(mouse)
local Target = mouse.Target local Sound = Instance.new("Sound")-- The "ding" sound Sound.SoundId = "rbxasset://sounds\\electronicpingshort.wav" Sound.Name = "PewPew" Sound.Parent = Tool
if Target and Target:IsA("BasePart") and not Target.Locked then if debounce == false then debounce = true Orig = Target Select = Orig:clone()
Select.Parent = game.Workspace Select.Position = Orig.Position + Vector3.new(0, 0.4, 0)
Dragger = Instance.new("Dragger") pcall(function() Dragger:MouseDown(Select, Vector3.new(0, 0, 0), {Select}) end)
SBox.Adornee = Select Sound:Play() wait(0.25)-- Edit this to how long you would like to wait until the next copy mouse.Icon = "rbxasset://textures\\DragCursor.png" debounce = false end end end
function onButton1Up(mouse) if Dragger then Orig = nil pcall(function() Dragger:MouseUp() end) Select = nil SBox.Adornee = nil Dragger = nil mouse.Icon = "rbxasset://textures\\CloneOverCursor.png" end end
function onMouseMove(mouse) if Dragger then mouse.Icon = "rbxasset://textures\\GrabRotateCursor.png" pcall(function() Dragger:MouseMove(mouse.UnitRay) end) else local Target = mouse.Target if Target and Target:IsA("BasePart") and not Target.Locked then mouse.Icon = "rbxasset://textures\\CloneOverCursor.png" else mouse.Icon = "rbxasset://textures\\CloneCursor.png" end end end
function onKeyDown(key) if Dragger then key = key:lower() if key == 'r' then Dragger:AxisRotate(Enum.Axis.Y) elseif key == 't' then Dragger:AxisRotate(Enum.Axis.Z) end end end
function onEquippedLocal(mouse) SBox.Color = BrickColor.new("Cyan") SBox.Parent = vPlayer.PlayerGui
mouse.Button1Down:connect(function() onButton1Down(mouse) end) mouse.Button1Up:connect(function() onButton1Up(mouse) end) mouse.Move:connect(function() onMouseMove(mouse) end) mouse.KeyDown:connect(onKeyDown) end
function onUnequippedLocal(mouse) if Tool:findFirstChild("PewPew") then Tool.PewPew:remove() end if Dragger then Orig = nil pcall(function() Dragger:MouseUp() end) Select = nil SBox.Adornee = nil Dragger = nil end end
Tool.Equipped:connect(onEquippedLocal) Tool.Unequipped:connect(onUnequippedLocal) --Credit to LinkIsaiah for adding (the so simple) waiting process. --Credit to whomever made the meshes.
Here u go |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2013 04:12 PM |
| Why? Just use HoppinBin ;\ ;D |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2013 04:16 PM |
errrrrrr.
Im trying to make the tool make the clone brick a random color T_T |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2013 04:26 PM |
| But how? Wow creative but.wow |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2013 05:44 PM |
| Help out please its for my group |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2013 05:50 PM |
| :\ A 'Clone too',l is for your 'group'..? |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2013 06:00 PM |
err.....
Its supposed to copy bricks into a random color. EG.
Theres a grey brick, a guys with the tool would come and copy it. The copied brickcolor changes.
It can be usful in the mini building field
Buts its not working |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2013 06:06 PM |
for i,v in pairs(game.Workspace:GetChildren()) do if v:IsA("Part") then v.Name == "Brick" v.BrickColor = BrickColor.random() end end
|
|
|
| Report Abuse |
|
|
|
| 13 Aug 2013 06:09 PM |
| Make that a function, edit it and then boom you're cooking on gas? :D |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 13 Aug 2013 06:12 PM |
--Dont listen to these narbs debounce = false local vPlayer = game.Players.LocalPlayer local SBox = Instance.new("SelectionBox") local Tool = script.Parent;
local Select local Orig local Dragger
function onButton1Down(mouse)
local Target = mouse.Target local Sound = Instance.new("Sound")-- The "ding" sound Sound.SoundId = "rbxasset://sounds\\electronicpingshort.wav" Sound.Name = "PewPew" Sound.Parent = Tool
if Target and Target:IsA("BasePart") and not Target.Locked then if debounce == false then debounce = true Orig = Target Select = Orig:clone()
Select.Parent = game.Workspace Select.BrickColor = BrickColor.random() Select.Position = Orig.Position + Vector3.new(0, 0.4, 0)
Dragger = Instance.new("Dragger") pcall(function() Dragger:MouseDown(Select, Vector3.new(0, 0, 0), {Select}) end)
SBox.Adornee = Select Sound:Play() wait(0.25)-- Edit this to how long you would like to wait until the next copy mouse.Icon = "rbxasset://textures\\DragCursor.png" debounce = false end end end
function onButton1Up(mouse) if Dragger then Orig = nil pcall(function() Dragger:MouseUp() end) Select = nil SBox.Adornee = nil Dragger = nil mouse.Icon = "rbxasset://textures\\CloneOverCursor.png" end end
function onMouseMove(mouse) if Dragger then mouse.Icon = "rbxasset://textures\\GrabRotateCursor.png" pcall(function() Dragger:MouseMove(mouse.UnitRay) end) else local Target = mouse.Target if Target and Target:IsA("BasePart") and not Target.Locked then mouse.Icon = "rbxasset://textures\\CloneOverCursor.png" else mouse.Icon = "rbxasset://textures\\CloneCursor.png" end end end
function onKeyDown(key) if Dragger then key = key:lower() if key == 'r' then Dragger:AxisRotate(Enum.Axis.Y) elseif key == 't' then Dragger:AxisRotate(Enum.Axis.Z) end end end
function onEquippedLocal(mouse) SBox.Color = BrickColor.new("Cyan") SBox.Parent = vPlayer.PlayerGui
mouse.Button1Down:connect(function() onButton1Down(mouse) end) mouse.Button1Up:connect(function() onButton1Up(mouse) end) mouse.Move:connect(function() onMouseMove(mouse) end) mouse.KeyDown:connect(onKeyDown) end
function onUnequippedLocal(mouse) if Tool:findFirstChild("PewPew") then Tool.PewPew:remove() end if Dragger then Orig = nil pcall(function() Dragger:MouseUp() end) Select = nil SBox.Adornee = nil Dragger = nil end end
Tool.Equipped:connect(onEquippedLocal) Tool.Unequipped:connect(onUnequippedLocal) |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2013 06:42 PM |
| :o you have insulted my troll :D also narbs = woah no back killing you :D |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 13 Aug 2013 06:45 PM |
I shall kill all u narbs
*kills self*
mind fruck ryt |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 14 Aug 2013 10:32 AM |
Works like a charm. THank you all.
A mod can close this now |
|
|
| Report Abuse |
|
|