|
| 31 Aug 2011 10:06 AM |
could anyone please help?
here is the script
function Scan(potato) if Broccoli:IsA("BasePart") then if((Broccoli:FindFirstChild("Mesh"))==true)then if(Broccoli.Mesh:IsA("FileMesh"))then Broccoli.Mesh.TextureId="http://www.roblox.com/asset/?id=" Broccoli.Color=Color3.new(0,1,0) Broccoli.Transparency=0.5 end else Broccoli.Transparency=1 Broccoli .CanCollide = true Broccoli.Anchored = true local sb=Instance.new("SelectionBox") b = Instance.new("SelectionBox", Broccoli) b.Adornee = Broccoli b.Color = Broccoli.BrickColor end end end
end elseif(Broccoli:IsA("Model"))then local gg=Broccoli:GetChildren() if(#gg)==0 then return end for x=1,#gg do find(gg[x]) end elseif(Broccoli:IsA("Tool"))then local gg=Broccoli:GetChildren() if(#gg)==0 then return end for x=1,#gg do find(gg[x]) end elseif(Broccoli:IsA("CharacterMesh"))then Broccoli.BaseTextureId=0 Broccoli.OverlayTextureId=0 elseif(Broccoli:IsA("Hat"))then local gg=Broccoli:GetChildren() if(#gg)==0 then return end for x=1,#gg do find(gg[x]) end end Broccoli.ChildAdded:connect(C) end function C(child) find(child)--lol end Workspace.ChildAdded:connect(C) local g=Workspace:getChildren() for i=1,#g do find(g[i]) end |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2011 10:09 AM |
| what is supposed to do is make bricks neon by inserting selections boxes in each part and the selection box is supposed to be the same color as the brick and the brick is supposed to be made transparent |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Aug 2011 10:10 AM |
Wed Aug 31 12:04:40 2011 - Running Script "Workspace.Script" Wed Aug 31 12:04:40 2011 - Workspace.Script:21: '< eof >' expected near 'end' |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
|
| 31 Aug 2011 10:11 AM |
| i spaced it so that roblox would not block it |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 31 Aug 2011 10:11 AM |
| It means you have to rid of at least one end. |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
|
| 31 Aug 2011 10:12 AM |
| could someone fix it for me? |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 31 Aug 2011 10:13 AM |
end elseif(Broccoli:IsA("Model"))then
The end is not necessary. Three if statements and a function. Four ends. The fifth end is not necessary. |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 31 Aug 2011 10:14 AM |
| Also, for an elseif, you need to rid of another end. Do not end the 'if' before the 'else'/'elseif'. |
|
|
| Report Abuse |
|
|
| |
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 31 Aug 2011 10:16 AM |
| Well, I can continue to fix it if you explain what 'if''s each else/elseif goes to.. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2011 10:17 AM |
| could you write out the fixed script and if it does not work ill tell you the output and then you tell me what to change? |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 31 Aug 2011 10:19 AM |
My last post will be the same response required.
I will continue to help if you tell me which 'if' statement each 'else' and 'elseif' go to. |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2011 10:19 AM |
Wed Aug 31 12:14:08 2011 - Running Script "Workspace.Script" Wed Aug 31 12:14:08 2011 - Workspace.Script:21: '< eof >' expected near 'elseif' |
|
|
| Report Abuse |
|
|
| |
|
|
| 31 Aug 2011 10:24 AM |
elseif(Broccoli:IsA("Model"))then local gg=Broccoli:GetChildren() if(#gg)==0 then return end for x=1,#gg do find(gg[x]) end elseif(Broccoli:IsA("Tool"))then local gg=Broccoli:GetChildren() if(#gg)==0 then return end for x=1,#gg do find(gg[x]) end elseif(Broccoli:IsA("CharacterMesh"))then Broccoli.BaseTextureId=0 Broccoli.OverlayTextureId=0 elseif(Broccoli:IsA("Hat"))then local gg=Broccoli:GetChildren() if(#gg)==0 then return end for x=1,#gg do find(gg[x]) |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2011 10:27 AM |
elseif(Broccoli:IsA("Model"))then this is so that if the part is in a model it changes it too elseif(Broccoli:IsA("Tool"))then if it is in a tool then it changes it too elseif(Broccoli:IsA("CharacterMesh"))then if it is a mesh then it changes it too elseif(Broccoli:IsA("Hat"))then if it in a hat then it changes it too |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 31 Aug 2011 10:39 AM |
Let us start, here.
function Scan(potato) if Broccoli:IsA("BasePart") then if((Broccoli:FindFirstChild("Mesh"))==true)then if(Broccoli.Mesh:IsA("FileMesh"))then Broccoli.Mesh.TextureId="http://www.roblox.com/asset/?id=" Broccoli.Color=Color3.new(0,1,0) Broccoli.Transparency=0.5 end else Broccoli.Transparency=1 Broccoli .CanCollide = true Broccoli.Anchored = true local sb=Instance.new("SelectionBox") b = Instance.new("SelectionBox", Broccoli) b.Adornee = Broccoli b.Color = Broccoli.BrickColor end end -- ONE OF THESE NEED TO GO FOR THE NEXT ELSEIF end
end -- THIS END NEEDS TO GO elseif(Broccoli:IsA("Model"))then local gg=Broccoli:GetChildren()
The first 'else' goes to which 'if'? (At least, which is it supposed to? Right now, it is going to "if((Broccoli:FindFirstChild("Mesh"))==true)then"
By the way, add spaces.
elseif(Broccoli:IsA("Model"))then
Where does that go to? Also, add spaces. "elseif Broccoli:IsA("Model") then" |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2011 10:51 AM |
aha figured it out
function find(blue) if blue:IsA("BasePart") then if((blue:FindFirstChild("Mesh"))==true)then if(blue.Mesh:IsA("FileMesh"))then blue.Mesh.TextureId="http://www.roblox.com/asset/?id=" blue.Color=Color3.new(0,1,0) blue.Transparency=0.5 end else blue.Transparency=1 blue.CanCollide = true blue.Anchored = true
local sb=Instance.new("SelectionBox") sb.Parent=blue sb.Name="Hologram" sb.Adornee = blue sb.Color = blue.BrickColor sb.Transparency=0 end elseif(blue:IsA("Model"))then local gg=blue:GetChildren() if(#gg)==0 then return end for x=1,#gg do find(gg[x]) end elseif(blue:IsA("Tool"))then local gg=blue:GetChildren() if(#gg)==0 then return end for x=1,#gg do find(gg[x]) end elseif(blue:IsA("CharacterMesh"))then blue.BaseTextureId=0 blue.OverlayTextureId=0 elseif(blue:IsA("Hat"))then local gg=blue:GetChildren() if(#gg)==0 then return end for x=1,#gg do find(gg[x]) end end blue.ChildAdded:connect(C) end function C(child) find(child)--lol end Workspace.ChildAdded:connect(C) local g=Workspace:getChildren() for i=1,#g do find(g[i]) end |
|
|
| Report Abuse |
|
|