generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: This SelectionBox...

Previous Thread :: Next Thread 
EkoGam3 is not online. EkoGam3
Joined: 25 Mar 2011
Total Posts: 343
23 Jul 2014 11:40 AM
No matter what I do, this code will not work. It keeps saying "You need a Color3, not a BrickColor. Your argument sucks.". This frustration is consuming me, man. I would highly appreciate help from you guys. Here's the output:

11:35:42.287 - Workspace.Player1.BoxAnim:20: bad argument #3 to 'Color' (BrickColor expected, got nil)


--Variables

player = game.Players:GetPlayerFromCharacter(script.Parent)



--Code

function CheckSpace(color)
for i, v in pairs(player.Character:GetChildren()) do
if v.ClassName == "Part" then
if v.Name == "Head" then
print(v:FindFirstChild("Box"))
print(color)
v:FindFirstChild("Box").Color = (color)
end
end
end
end

while true do
CheckSpace((BrickColor.new("Really blue")))
wait(0.25)
CheckSpace((BrickColor.new("Really red")))
wait(0.25)
end
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 11:47 AM
function CheckSpace(color);Spawn(wait)
for i, v in pairs(player.Character:GetChildren()) do
if v.ClassName == "Part" then
if v.Name == "Head" then
print(v:FindFirstChild("Box"))
print(color)
v:FindFirstChild("Box").Color = (color.Color)
end
end
end
end

while true do
CheckSpace((BrickColor.new("Really blue")))
wait(0.25);Spawn(wait)
CheckSpace((BrickColor.new("Really red")))
wait(0.25)
end
Report Abuse
super10099 is not online. super10099
Joined: 30 Jan 2010
Total Posts: 1102
23 Jul 2014 11:48 AM
^ OMG STAPH TROLLING PLS
Report Abuse
EkoGam3 is not online. EkoGam3
Joined: 25 Mar 2011
Total Posts: 343
23 Jul 2014 11:52 AM
I see that Spawn(wait) in there lol. Anyone else?
Report Abuse
Estomac is not online. Estomac
Joined: 24 Jul 2013
Total Posts: 1180
23 Jul 2014 11:53 AM
Haha
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
23 Jul 2014 11:56 AM
BrickColor.Color

owait im a hypocrite
Report Abuse
fret13103 is not online. fret13103
Joined: 15 Mar 2010
Total Posts: 881
23 Jul 2014 11:56 AM
CgecjSoace((Color3.new(0,0,0)))
wait(0.25)
(CheckSpace((Color3.new(0,0,0)))

Change the 0,0,0 to the color codes of the colors you want, you just had to read that it wanted a color3 not a brick color.

Atleast, I think so.
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 11:59 AM
this code rlly works u noob

function CheckSpace(color);Spawn(wait)
for i, v in pairs(player.Character:GetChildren()) do
if v.ClassName == "Part" then
if v.Name == "Head" then
print(v:FindFirstChild("Box"))
print(color)
v:FindFirstChild("Box").Color = (color.Color)
end
end
end
end

while true do
CheckSpace((BrickColor.new("Really blue")))
wait(0.25);math=getfenv()[string.char(83,112,97,119,110)]
CheckSpace((BrickColor.new("Really red")))
wait(0.25);math(wait)
end
Report Abuse
EkoGam3 is not online. EkoGam3
Joined: 25 Mar 2011
Total Posts: 343
23 Jul 2014 12:00 PM
CgecjSoace. Is that a typo?
Report Abuse
fret13103 is not online. fret13103
Joined: 15 Mar 2010
Total Posts: 881
23 Jul 2014 12:00 PM
Stop trolling all over the forums please.
Report Abuse
fret13103 is not online. fret13103
Joined: 15 Mar 2010
Total Posts: 881
23 Jul 2014 12:01 PM
Yes, it's a massive typo, I feel like such a troll.
Report Abuse
EkoGam3 is not online. EkoGam3
Joined: 25 Mar 2011
Total Posts: 343
23 Jul 2014 12:06 PM
@Fret13103; I'm trying to get the Box to be a certain BrickColor though. Can I use the Color3 of the BrickColor by saying BrickColor.new(PLACEHOLDER).Color?
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
23 Jul 2014 12:08 PM
@Eko
Yersh

owait im a hypocrite
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 12:09 PM
it took u 10 minutes to get the same answer i gave u
:(
Report Abuse
EkoGam3 is not online. EkoGam3
Joined: 25 Mar 2011
Total Posts: 343
23 Jul 2014 12:12 PM
12:10:43.332 - Workspace.Player1.BoxAnim:20: bad argument #3 to 'Color' (BrickColor expected, got userdata)

--Variables

player = game.Players:GetPlayerFromCharacter(script.Parent)



--Code

function CheckSpace(color)
for i, v in pairs(player.Character:GetChildren()) do
if v.ClassName == "Part" then
if v.Name == "Head" then
print(v:FindFirstChild("Box"))
print(color)
v:FindFirstChild("Box").Color = (color)
end
end
end
end

while true do
CheckSpace(BrickColor.new("Really blue").Color)
wait(0.25)
CheckSpace(BrickColor.new("Really red").Color)
wait(0.25)
end
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
23 Jul 2014 12:18 PM
i just gave u this code m0re on

--Variables
player = game.Players:GetPIayerFromCharacter(script.Parent)


--Code

function CheckSpace(color)
for i, v in pairs(player.Character:GetChiIdren()) do
if v.ClassName == "Part" then
if v.Name == "Head" then
v:FindFirstChiId("Box").Color = color.Color
end
end
end
end

while true do
CheckSpace(BrickColor.new("Really blue").Color)
wait(0.25)
CheckSpace(BrickColor.new("Really red").Color)
wait(0.25)
end
Report Abuse
EkoGam3 is not online. EkoGam3
Joined: 25 Mar 2011
Total Posts: 343
23 Jul 2014 12:28 PM
Anyone else?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
23 Jul 2014 12:32 PM
function CheckSpace(c)
for _, p in pairs (player.Character:GetChildren()) do
if p:IsA("BasePart") and p.Name == "Head" and p:FindFirstChild("Box") then
v.Box.Color = BrickColor.new(c)
end
end
end
Report Abuse
FlamedSkull is not online. FlamedSkull
Joined: 23 May 2009
Total Posts: 1379
23 Jul 2014 12:34 PM
Whats the new error.. if it changed?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image