#Auto Team

1 messages · Page 1 of 1 (latest)

grave locust
#

Auto team works for everyone else weather that be they are in a regiment or if they are in HQ but if they are supposed to be on the Recruit team or on the British army team they just spawn on a random regiment team (such as PARAS). I have no clue why this could be happening as it works for everyone else who isn't in a regiment.
Please help

chrome delta
#

@grave locust which one is recruit and which one is british army

ornate raft
#

wat if a player is in more than 1 group thonkoof

chrome delta
#

Yea thats what im thinking aswell

#

cause if the recruit and british army is further down the elseifs, then if a player is in a group thats before that, itll just set it to that and move on

grave locust
#

Line 2 and line 3 are british army and line 9 is recruit

chrome delta
#

where exactly are you checking for "rec"

#

"rec" and "rank" will be the same variable btw

#

Which ones of the if statements is supposed to apply "recruit" and which is supposed to apply "british army"?

grave locust
#

@chrome delta line 19 is for recruit and line 22 is for british army. Do you have any Idea why this could be happening?

ornate raft
grave locust
#

They can't be, I have manual accept on

manic roseBOT
#

studio** You are now Level 1! **studio

ornate raft
#

did you write this code yourself or did you get it from someone else or ai or tutorial or whatnot?

ornate raft
grave locust
#

Yes

#

And the brick colours

ornate raft
#

what is RIC?

grave locust
#

Royal Intelligence Corps

ornate raft
#

no i meant what is it in the code

grave locust
#

I just realised its not there but thats an easy fix and thats not the issue

#

do you have any idea as to why they automatically spawn on the wrong team unless they are in a regiment?

ornate raft
#

or you put the right ids into the wrong variables

grave locust
grave locust
ornate raft
grave locust
ornate raft
#

there's RE but no REC

grave locust
#

Royal engineers

#

I meant rec

ornate raft
grave locust
#

Yes but rec is the group rank equivalent to 1 as shown on line 20

#

So that should work

#

and British army personnel is shown on line 23

#

So I don't know where I've gone wrong

ornate raft
#

do you understand how if statements work?

grave locust
#

Not really sorry

ornate raft
#

The basic if statement tests its condition. If the condition is true, then Luau executes the code between then and end.

You can use an elseif statement to test for additional conditions if the if condition is false. You can use an else statement to execute code if all if and elseif conditions fail. The elseif and else parts are both optional, but you can't use either without an initial if statement.

In a chain of if, elseif, and else conditions, Luau tests conditions from top to bottom, stops at the first true condition, and executes the code that follows it.

if 2 + 2 == 5 then
print("Two plus two is five") -- Doesn't print because the condition is false
elseif 2 + 3 == 5 then
print("Two plus three is five") -- Two plus three is five
else
print("All conditions failed") -- Doesn't print because the previous condition is true
end

grave locust
#

So what do I change?

ornate raft
grave locust
#

Do I chnage both the if statements to elseif?

grave locust
ornate raft
#

we're here to help, not spoonfeed you free code

grave locust
#

Thats not what I'm asking

#

I'm just wondering if making that chnage will then make the teams work

manic roseBOT
#

studio** You are now Level 2! **studio