I'm not sure how to put the final script together correctly i keep getting the following error:
Expected identifier when parsing expression, got '['
local block = game.Workspace.MF local sword = game.ReplicatedStorage.Heal
block.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then if not hit.Parent:FindFirstChildWhichIsA("Tool") then if not game.Players[hit.Parent.Name].Backpack:FindFirstChild(sword.Name) then sword:Clone().Parent = hit.Parent print(sword.Name .. " gave to " .. hit.Parent.Name)
local magnitude = (Player.Character.PrimaryPart.Position - script.Parent.Position).magnitude
while magnitude < [1] do
magnitude = (Player.Character.PrimaryPart.Position -Door.Hitbox.Position).magnitude
wait(0.1)
end
Player.Character.[Heal]:Destroy()
end
end
end
end)
