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

Workspace.Part.stored:28: Expected ')' (to close '(' at line 13), got 'end' ?

Asked by 2 years ago
local Players = game:GetService("Players")
local TouchPart = workspace.Part 
local Teams = game:GetService("Teams")

TouchPart.Touched:Connect(function(touched)

    if touched.Parent:IsA("Model") and touched.Parent:FindFirstChild("Humanoid") then

        local Player = Players:GetPlayerFromCharacter(touched.Parent)

        if Player then

        game.Players.PlayerAdded:Connect(function(player)


                if player.Team == Teams["(Owners)"] then

                    local leaderstats = Player.leaderstats
                    local stored = leaderstats and leaderstats:FindFirstChild("Stored")

                    leaderstats:FindFirstChild("Notes").Value = leaderstats:FindFirstChild("Notes").Value + leaderstats:FindFirstChild("Stored cotton").Value
                    leaderstats:FindFirstChild("Stored cotton").Value = leaderstats:FindFirstChild("Stored cotton").Value - leaderstats:FindFirstChild("Stored cotton").Value



                end
            end
        end
    end)
end)

It says eiter Workspace.Part.stored:28: Expected ')' (to close '(' at line 13), got 'end' or expected identifier when parsing expression got ")"

I am sitting here for like 30 minutes looking for the soulution and nothing works

1 answer

Log in to vote
0
Answered by 2 years ago

Simple fix hoo-rah!

At line 28, that end needs to be end)

Ad

Answer this question