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

Got a problem with if statements, any help?

Asked by
WishXVI 94
4 years ago

ok so here is my code, if statements are kinda weird, it is the "=" (in the if statement) is not correct

local team = game.Players.LocalPlayer.Team
local bigfoot = game.Teams.Bigfoot
local player = game.Players.LocalPlayer
if team = bigfoot then

end

2 answers

Log in to vote
0
Answered by
JesseSong 3916 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

Make sure you add 2 equals when using if statements at line 4 And I suggest doing more research before commenting.

if team == bigfoot
0
thanks! WishXVI 94 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

You do not use = to compare, you use ==, remember that you use = to set value (or something) and you use == to compare, like: if a == b then

Answer this question