AllowTeamChangeOnTouch (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator
example
>Samacado
No edit summary
Line 12: Line 12:
[[Category:Properties]]
[[Category:Properties]]


{{Example|<pre>
{{Example|<code lua>
local bools = { false, true }
local bools = { false, true }
local teams = game:GetService( "Teams" ):GetTeams()
local teams = game:GetService( "Teams" ):GetTeams()
Line 27: Line 27:
   spawn.TeamColor = teams[ math.random( 1, #teams ) ]
   spawn.TeamColor = teams[ math.random( 1, #teams ) ]
   spawn.Touched:connect( function( otherPart ) change_AllowTeamChangeOnTouch( otherPart, spawn ) end )
   spawn.Touched:connect( function( otherPart ) change_AllowTeamChangeOnTouch( otherPart, spawn ) end )
end</pre>}}
end</code>}}

Revision as of 23:54, 14 January 2012

AllowTeamChangeOnTouch
Property Bool AllowTeamChangeOnTouch
Description When enabled, allows the player that touched the object to join the object's team.
Member of SpawnLocation
Example
{{{1}}}