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

Error is in line 12 but what is it? [closed]

Asked by 8 years ago
local white = ("Institutional white")
local black = ("Really black")
local teams = game:GetService("Teams"):GetTeams()

script.Parent.Touched:connect(function(hit)
    player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
        for i = 1, #teams do
            team = teams[i]
            if team.TeamColor == player.TeamColor then
                script.Parent.BrickColor = BrickColor.new(team.TeamColor)
                script.Parent.Material = "Neon"
            end
        end
    end
end)

Closed as Too Broad by User#6546 and evaera

This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 8 years ago

You tell us.

We are not a substitute for your brain.

0
No need to be rude. I am only asking for help, I am learning scripting all I want is help and people have to be sassy about it. I was told that people who are learning are treated nicely. Rakonus 0 — 8y
0
You told us nothing. Nothing. Nada. Nowt. Nil. Squat. User#6546 35 — 8y
Ad
Log in to vote
0
Answered by
vinboi 0
8 years ago

Team.TeamColor is not an object. You can't make a new one of that since it is a property

0
Wrong :c User#6546 35 — 8y