|
if Player.TeamColor == "Bright blue" then
Checks if players in a team but cant remember how to do it. lol |
|
noahJoin Date: 2006-09-11 Post Count: 18977 |
if Player.TeamColor == BrickColor.new("Bright blue") then |
|
|
|
erm it isn't working :L
player = script.Parent.Parent
do
wait(1)
if Player.TeamColor == BrickColor.new("Bright yellow") then
end end
that's full script without the main stuff. |
|
|
You can't just say "do". It's not a slave in which you just give a demand, lol.
You should look up on Lua loops in Roblox: http://wiki.roblox.com/index.php/Loops
player = script.Parent.Parent;
while true do -- an infinite loop, so it continues to run here
wait(3); -- wait 3 seconds so it doesn't come near crash or lagging which it most likely wont
if player.TeamColor == BrickColor.new("Bright yellow") then -- the p in player here should be lower case as that is how you defined it
end end |
|
|
player = script.Parent.Parent
do
wait(2)
if Player.TeamColor == BrickColor.new("Bright blue") then
game.Lighting["tool"]:clone().Parent = player.Backpack
end end
-- Don't need a loop. -_- It's a one time thing... >_> |
|
|
never said I needed a loop anywhere.. And yes it still dose not work. |
|
|
I already said that you can't use the word "do".. That should have automatically led you to deleting it from your script.
player = script.Parent.Parent;
wait(2);
if player.TeamColor == BrickColor.new("Bright blue") then
game.Lighting["tool"]:Clone().Parent = player.Backpack;
end end |
|
|
*Needs help from someone who knows what there doing!* |
|
|
@Lego you can put do in there although it is pointless.
@OP, He told you what you did wrong.
You put player = ...
then you used if Player
Capitalization matters. |
|
|
You can actually put do in there? I never knew. |
|
|
yup yup but nothing he told me has fixed anything soo yeh and everything he told is almost useless |
|
|
> do print("Still Works") end
Still Works |
|
|
I told you what was wrong and I fixed your script, yet you post back with 'new' script that made no changes to what I told you to do. You're just not making the changes I'm telling you.. |
|
|
--It's this line!
if player.TeamColor == BrickColor.new("Bright blue") then
100% sure its this.
Something is wrong here...
without it it works fine but both teams get double tools and they don't work right :p |
|
|
Add this is:
print( player.TeamColor)
Come back with the output. |
|
|
|
dude I copied and pasted it right away did nothing it dose not work. :p
maybe you should test it :o |
|
|
It works, Even though I knew it would work I tested it anyway.
> if game.Players.Player1.TeamColor == BrickColor.new("Bright blue") then print("Derp") end
Derp |
|
|
got it working and yesh I was in a team >_>
btw why do you put the ; on the scripts?
like
script.parent; |
|
|
Some people put it to look nicer, I find it pointless though. |
|
|
--pointless and more to type :p
--that's like putting -- hello at every end of a script o.o
function onTouched(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if hum ~= nil then
local player = game.Players:findFirstChild(hit.Parent)
if player.Name == script.nam.Value or player.TeamColor == BrickColor.new("Bright yellow") then
human.Health = 0
else
end end end
script.Parent.Touched:connect(onTouch) |
|
|
local human = hit.Parent:FindFirstChild("Humanoid")
if hum ~= nil then |
|
|
|
-- attempt to call a nil value?
function onTouched(hit)
local human = hit.Parent:FindFirstChild("Humanoid")
if human ~= nil then
local player = game.Players:findFirstChild(hit.Parent)
if player.Name == script.nam.Value or player.TeamColor == BrickColor.new("Bright yellow") then
human.Health = 0
print'works'
else
end end end
script.Parent.Touched:connect(onTouch) |
|