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 :

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

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


local char = script.Parent.Parent.Parent.Character
local root = char:FindFirstChild((“HumanoidRootPart”)
if root:FindFirstChild(“BodyForce”) then

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


: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