Expected ) to close at line 32

Line 32 is the top of the part of the script i’m sending, i’m probably just an idiot but I can’t figure it out

		local parentModel = part.Parent
		if parentModel then 
			-- check to see if this model has already been hit 
			if modelsHit[parentModel] then
					local HitHumanoid =	parentModel:FindFirstChild("Humanoid")

			-- look for a humanoid
				local character = script.Parent.Parent
				local humanoid = character:FindFirstChildOfClass("Humanoid")
				local plr = Players:GetPlayerFromCharacter(character)
				local HitHumanoid =	parentModel:FindFirstChild("Humanoid")

				local tStatus = HitHumanoid.Status
				local targetStats = tStatus.DamageStats
				local damage = 140

				local statsNew = Instance.new("BoolValue")
				statsNew.Name = #targetStats:GetChildren()
				local tag = Instance.new("IntValue")
				tag.Value = damage
				tag.Name = "DamageDealt"
				tag.Parent = statsNew
				local tag2 = Instance.new("ObjectValue")
				tag2.Value = plr
				tag2.Name = "Attacker"
				tag2.Parent = statsNew
				local tag3 = Instance.new("Vector3Value")
				tag3.Value = plr.Character.HumanoidRootPart.Position
				tag3.Name = "AttackerPosition"
				tag3.Parent = statsNew
				statsNew.Parent = targetStats
				--get and set current knife kill effect
				local tag4 = Instance.new("StringValue")
				tag4.Value = "HighForce"
				tag4.Name = "KillEffect"
				tag4.Parent = statsNew
				--get and set current knife kill effect
				local tag5 = Instance.new("NumberValue")
				tag5.Name = "SecondaryHit"
				tag5.Value = 1/2
				tag5.Parent = statsNew

In additon to what @Obiectum said, remove the ) in the end from here

1 Like

You have an arbitrary closing parenthesis, with no complementary opening parenthesis. Just remove it.

This is incorrect

1 Like

don’t quote my post that is under yours, it breaks the continuity of the topic lol

The closing parenthesis would be arbitrary. It’s just not valid Lua(u) syntax

local function foo()

end) -- why would there be an ) ? and why only for functions?