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

how to add all of the values of connected parts?

Asked by 7 years ago
Edited 7 years ago

This is my code, i am trying to add up all of the values into a total amount.

local parts = script.Parent.Parent.Parent:GetConnectedParts()
for i = 1, #parts do
    if parts[i].Name == "Storage" then
        script.Parent.Text = parts[i].Value.Value
    end
end
0
What is the problem? jamesarsenault 192 — 7y

Answer this question