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: Would this work?

Previous Thread :: Next Thread 
ForceSky is not online. ForceSky
Joined: 30 Jul 2012
Total Posts: 2379
14 Apr 2013 12:21 PM
This is a script for a CTF game. C1 is a spawn.

function onTouch(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr ~= nil then
local color = plr.TeamColor
game.Workspace.C1.TeamColor = color
end
script.Parent.Touched:connect(onTouch)

OR

Would line 5 have to be "game.Workspace.C1.TeamColor = TeamColor.new(color)?"
Report Abuse
MrTechn0 is not online. MrTechn0
Joined: 23 Nov 2012
Total Posts: 1252
14 Apr 2013 12:28 PM
Is GetPlayerFromCharacter is nil i believe if there was something like this it would have to have the first word be uncapatalized e.g. getPlayerFromCharacter
Report Abuse
ForceSky is not online. ForceSky
Joined: 30 Jul 2012
Total Posts: 2379
14 Apr 2013 12:30 PM
No, it doesn't really matter if get is capitalized or not. That's just scripters' different styles.
Report Abuse
ForceSky is not online. ForceSky
Joined: 30 Jul 2012
Total Posts: 2379
14 Apr 2013 12:42 PM
Bump.
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
14 Apr 2013 12:43 PM
Test yourself and find out.
Report Abuse
ForceSky is not online. ForceSky
Joined: 30 Jul 2012
Total Posts: 2379
14 Apr 2013 12:44 PM
Can't. Whenever I try to start server, Studio crashes.
Report Abuse
TheGamer101 is not online. TheGamer101
Joined: 14 Feb 2009
Total Posts: 11943
14 Apr 2013 12:46 PM
Needs another end.
Report Abuse
ForceSky is not online. ForceSky
Joined: 30 Jul 2012
Total Posts: 2379
14 Apr 2013 12:51 PM
Ohya. I forgot to add that. Just ignore the missing end.
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