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: Help with Selection Box script?

Previous Thread :: Next Thread 
QuillStrike is not online. QuillStrike
Joined: 09 Jan 2013
Total Posts: 107
08 Sep 2014 11:55 AM
This script is supposed to create a selection box, and place it in the user's Left Arm. The script is supposed to make the SelectionBox "Cyan" by default, but if the players teamcolor is "Bright red" then make the selection box color "Bright red". The problem is that the SelectionBox is always red for all the characters, even if they aren't on the red team.

game.Workspace.ChildAdded:connect(function(Character)
wait()
repeat wait() until game.Players.LocalPlayer
local p = game.Players.LocalPlayer
local box = Instance.new("SelectionBox")
box.Parent = Character["Left Arm"]
box.Adornee = Character["Left Arm"]
box.Color = BrickColor.new("Cyan")
wait()
if p.TeamColor == BrickColor.new("Bright red") then
wait(.5)
box.Color = BrickColor.new("Bright red")
end
end)

Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
08 Sep 2014 12:00 PM
game.Workspace.ChildAdded:connect(function(Character)
wait()
repeat wait() until game.Players.LocalPlayer
local p = game.Players.LocalPlayer
local box = Instance.new("SelectionBox")
box.Parent = Character["Left Arm"]
box.Adornee = Character["Left Arm"]
box.Color = BrickColor.new("Cyan")
wait()
box.Color = p.TeamColor
end)



?
Report Abuse
QuillStrike is not online. QuillStrike
Joined: 09 Jan 2013
Total Posts: 107
08 Sep 2014 12:11 PM
I tried it, still getting the same issue. :/
Report Abuse
QuillStrike is not online. QuillStrike
Joined: 09 Jan 2013
Total Posts: 107
08 Sep 2014 12:28 PM
Bump
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
08 Sep 2014 12:44 PM
Use the wiki and you magicly see its a bug. :O

Its made of magic :P
Report Abuse
Diogen is not online. Diogen
Joined: 01 Jul 2011
Total Posts: 17
08 Sep 2014 01:01 PM
You need to set the Adornee...
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
08 Sep 2014 01:08 PM
He did
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