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

Help with this uniform script?

Asked by 9 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

My goal is so that when the player respawns they are uniformed. Unfortunately, that isn't working..

01local home;
02local away;
03function GetHome() -- To find the hometeam
04    for i, v in pairs(game.Teams:GetChildren()) do
05        if v:findFirstChild("home") then
06            return v
07        end
08    end
09    return nil
10end
11 
12function GetAway() -- To find the away team
13    for i, v in pairs(game.Teams:GetChildren()) do
14        if v:findFirstChild("away") then
15            return v
View all 45 lines...
0
What's the problem? BlueTaslem 18071 — 9y
0
When the character respawns the uniform isnt put on them. Ethan_Waike 156 — 9y
0
Is there any error? What debugging have you done? Do you realize the script you've pasted here has a syntax error on line 31? BlueTaslem 18071 — 9y
0
Yeah lol I added the comments Ethan_Waike 156 — 9y

1 answer

Log in to vote
1
Answered by
3dsonicdx 163
9 years ago

Just a notice - Instead of directly removing the shirt/pants - check whether they have those or not. It will error if they don't have either of those.

Or assuming they have shirts/pants - you can change the ID to the away/home ID instead of adding/removing.

Ad

Answer this question