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: onTouch

Previous Thread :: Next Thread 
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
18 Nov 2012 08:25 AM
Hello, just posting a simple onTouch script for some revision. I'm unsure as to what is wrong with it (there is no output message), but I am guessing it has something to do with my first time use of GetPlayerFromCharacter.

function onTouched(brick)
wait(.1)
s = script.Parent.Parent.Screen
if brick.Parent.Humanoid == true then
brick.Parent:GetPlayerFromCharacter(player)
if player.TeamColor == "Cool yellow" then
s.BrickColor = Color3.new("Cool yellow")
game.Workspace.Values.TerminalOwned.Value = ("BEE")
elseif
player.TeamColor == "Bright red" then
s.BrickColor = Color3.new("Bright red")
game.Workspace.Values.TerminalOwned.Value = ("Raiders")
elseif
player.TeamColor == "Bright green" then
s.BrickColor = Color3.new("Cool yellow")
game.Workspace.Values.TerminalOwned.Value = ("BEE")
elseif
player.TeamColor == "Really black" then
s.BrickColor = Color3.new("Cool yellow")
game.Workspace.Values.TerminalOwned.Value = ("BEE")
end
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
AComplexName is not online. AComplexName
Joined: 11 Nov 2012
Total Posts: 132
18 Nov 2012 08:30 AM
Do you need to have Color3.new when your not giving it numbers? Such as Color3.new(225, 225, 225)?
Report Abuse
AComplexName is not online. AComplexName
Joined: 11 Nov 2012
Total Posts: 132
18 Nov 2012 08:32 AM
Try putting s.BrickColor = BrickColor.new("Color")
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
18 Nov 2012 08:32 AM
That's my problem, thanks. I was working with GUIs prior to this, so I must have put it in there by accident, and overlooked it.

I will fix those errors.
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
18 Nov 2012 08:40 AM
I'm still having issues. There is no output error, and it doesn't appear to be affecting the color of the Screen at all.
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
18 Nov 2012 08:52 AM
Bump
Report Abuse
AComplexName is not online. AComplexName
Joined: 11 Nov 2012
Total Posts: 132
25 Nov 2012 11:06 AM
Have you figured it out yet?
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