Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

Simple fix hoo-rah!

At line 28, that end needs to be end)

This discussion is preserved as it was. New answers, comments, and votes are closed.