Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I'm on the right team, but spawning on the wrong spawn?

Asked by 11 years ago

Hi,

I have 2 teams, SFU (a group, TeamColor "Bright green") and Otherwise (anything else, TeamColor "White").

I have a script in the SFU spawn, which is this:

01group = 825311
02deb = true
03function Check(p)
04if p ~= nil then
05deb = false
06local human = p.Parent
07if human ~= nil then
08local player = game.Players:GetPlayerFromCharacter(human)
09if player ~= nil then
10end
11 
12if player:IsInGroup(group) then
13print("Yep!")
14player.TeamColor = BrickColor.new("Bright green")
15else
View all 22 lines...

The scoreboard says I'm on the "Otherwise" team, but I spawn at the SFU spawn, and I checked the output, and it said

Nope!

Nope! (Yes it did it twice)

What is going wrong?

1 answer

Log in to vote
0
Answered by 11 years ago

You need to have a indicator in the script, that let's the script no that a certain player is in this group. I don't know a lot about scripting but you need some sort of indicator. If this did not help, please don't give me thumbs down.

0
Didn't help, but I don't have enough rep to thumb you down, so I'll just post this. iRzPWNzr 20 — 11y
0
;( arjun9022 34 — 11y
Ad

Answer this question