Gravity Coil Script Not Working

i follwed a yt tutorial to make gravity coil but its not working and showing error pls help
here is the code :

script.Parent.Equipped:Connect(function()
local root = script.Parent.Parent:FindFirstChild((“HumanoidRootPart”)
local bodyForce = Instance.new(“BodyForce”)
for i,v in pairs(script.Parent.Parent:GetDescendants()) do
if v:IsA(“BasePart”) and v.Name ~= “HumanoidRootPart” then
v.Massless = true

		end
	end
	bodyForce.Force=Vector3.new(0,Workspace.Gravity * root:GetMass())/gravityDivider,0)
bodyForce.Parent= root

end)

script.Parent.Unequipped:Connect(function))
local char = script.Parent.Parent.Parent.Character
local root = char:FindFirstChild((“HumanoidRootPart”)
if root:FindFirstChild(“BodyForce”) then
root[“BodyForce”]:Destroy()

end
for i,v in pairs(script.Parent.Parent:GetDescendants()) do
	if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
		v.Massless = false
end

)

:Connect(function)) should be :Connect(function().
(Line 11)

ohh okee thank you but output window also showing error in 2nd line

1 Like

Please show me a picture? I can help.

there’s an extra parenthesis here.
should be:

local root = script.Parent.Parent:FindFirstChild("HumanoidRootPart")

Oh yeah. Also change that to WaitForChild so it can wait until it finds it instead of erroring like it does sometimes with just using FindFirstChild.

No, the only problem there is the fact he had an extra parenthesis. if the tool is equipped by a player, there should of course be a character and a humanoid.

And this too but yeah