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

How to fix Incomplete statement error?

Asked by
DBoi941 57
5 years ago

I get an error on line 9 saying "Incomplete statement: expected assignment or a function call" I am not sure what is happen here never seen this before.

01db = false
02brick.Touched:Connect(function(hit)
03if hit.Parent:FindFirstChild("Humanoid") then
04    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
05    if not db then
06        db = true
07        if player.Character.MWinner.Value == true then
08            giveReward(player)
09            player.Character.MWinner.Value == false
10                else
11            end
12            wait(5)
13            db = false
14        end
15    end
16end)
0
MWinner is a bool value after the giveReward function I am trying to set the MWinner to false so it does not run the giveReward function again. This is in a script not a local script. DBoi941 57 — 5y
2
You have one too many "=" on line 9 SteelMettle1 394 — 5y
0
Wow, Not sure how i missed that. Thank you very much. DBoi941 57 — 5y

Answer this question