Hello, I need help with a local script of mine. It is in a tool called Mjolnir, but for some reason the script is not working. When I click E it is supposed to make Mjolnir return to me. In the output it says there is an issue.
Here is what the output says:
15:30:19.545 - Infinite yield possible on 'Workspace:WaitForChild("Mjolnir")'
And it also says
15:30:20.517 - Something unexpectedly tried to set the parent of Mjolnir to NULL while trying to set the parent of Mjolnir. Current parent is turbomegapower12345.
and now here is my script
local Humanoid = game.Players.LocalPlayer.Character.Humanoid
local Mjolnir = game.Players.LocalPlayer.Backpack:WaitForChild("Mjolnir")
local name = game.Players.LocalPlayer.Name
local tool = script.Parent
local toolreturn = game.Workspace:WaitForChild("Mjolnir")
--Buffs--
tool.Equipped:connect(function()
if name ==("turbomegapower1234") then
Humanoid.MaxHealth = 100000
Humanoid.Health = 100000
Humanoid.WalkSpeed = 100
else
Mjolnir:Remove()
end
end)
--Removing Buffs --
tool.Unequipped:connect(function()
if name ==("turbomegapower12345") then
Humanoid.MaxHealth = 100
Humanoid.Health = 100
Humanoid.WalkSpeed = 16
end
end)
--this section is the one I need help on!--
local player = game.Players.LocalPlayer
local character = player.Character
local mouse = player:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "e" then
character.Humanoid:EquipTool(toolreturn)
else
end
end)
Thank you for the help!

2 comments
Is the Mjolnir in workspace?
yes, when I drop it.