|
while true do
wait(2)
if script.Parent.Value = 2
then
script.Parent.Parent.Team1.Value = script.Parent.Parent.Team1.Value +1
end
elseif script.Parent.Value = 1
then
script.Parent.Parent.Team1.Value = script.Parent.Parent.Team1.Value +1
end
end
what is wrong with it?... |
|
Legend26Join Date: 2008-09-08 Post Count: 10586 |
You use "=" to CHANGE a value. In if statements, you use "==" instead to CHECK a value. |
|
|
so would i do as this?
while true do
wait(2)
if script.Parent.Value == 2
then
script.Parent.Parent.Team1.Value = script.Parent.Parent.Team1.Value +1
end
elseif script.Parent.Value == 1
then
script.Parent.Parent.Team1.Value = script.Parent.Parent.Team1.Value +1
end
end
|
|
|
Why do you need to different... things? Couldn't you just do:
while true do
wait(2)
if script.Parent.Value = (1, 2)
script.Parent.Parent.Team1.Value = script.Parent.Parent.Team1.Value+1
end
end |
|
|
Dang... got here late, AND I forgot double equal signs... |
|
|
im doing it as a domination style game type and those are the teams scores so i want them to be seperate |
|
|
|
and oops sorry my mistake ment to post this
while true do
wait(2)
if script.Parent.Value == 2
then
script.Parent.Parent.Team1.Value = script.Parent.Parent.Team1.Value +1
end
elseif script.Parent.Value == 1
then
script.Parent.Parent.Team2.Value = script.Parent.Parent.Team1.Value +1
end
end
|
|
lupineJoin Date: 2008-06-24 Post Count: 3561 |
elseif does not need an end. Remove the else part or the end after the first if statement. |
|
|
please just right out what it should be because im confused when everyones says bunch of diffrent things |
|
|
while true do
wait(2)
if script.Parent.Value == 2
then
script.Parent.Parent.Team1.Value = script.Parent.Parent.Team1.Value +1
end
elseif script.Parent.Value == 1
then
script.Parent.Parent.Team2.Value = script.Parent.Parent.Team2.Value +1
end
end
|
|
lupineJoin Date: 2008-06-24 Post Count: 3561 |
while true do
if script.Parent.Value == 2 then
script.Parent.Parent.Team1.Value = script.Parent.Parent.Team1.Value +1
elseif script.Parent.Value == 1 then
script.Parent.Parent.Team2.Value = script.Parent.Parent.Team2.Value +1
end
wait(2)
end |
|
|
well that didnt work either but i found out on my own so cya and thanks for trying to helpl everyone |
|