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
)