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

Incomplete statement: expected assignment or a function call?

Asked by 2 years ago
local CashValue = script.Parent.Parent.Parent.Parent.Values.CashValue

script.Parent.Touched:Connect(function(Hit)
    if Hit.Name == "Part" and Hit:FindFirstChild("CashValue") then
        CashValue.Value += 1 -- Change 1 to the number of cash you want to give
        Hit:FindFirstChild("CashValue").Value
        Hit:Destroy()
    end
end)
0
Line 6: What are you trying to do? echobloxia 21 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

You need to change line 6. The error is at line 6, because you are merely referencing the CashValue

Ad

Answer this question