I have a local script that puts an aura around the player when I press q and then unequips when I press q but when I tried to equip it again there is an error that says " The Parent property of Bubble is locked, current parent: NULL, new parent HumanoidRootPart"
script:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse();
local tool = player.Backpack.ElectroBubble;
local toggle = false
local attachment = Instance.new("Attachment")
local ElectroBubble = game.ReplicatedStorage.Bolts:Clone()
local ElectroBubble2 = game.ReplicatedStorage.Bubble:Clone()
mouse.KeyDown:connect(function(key)
if not toggle and key == "q" then
player.Character.Humanoid:EquipTool(tool)
player.Character.LowerTorso.Locked = false
attachment.Name = "Bubble"
attachment.Parent = player.Character.LowerTorso
ElectroBubble.Parent = player.Character.LowerTorso.Bubble
ElectroBubble2.Parent = player.Character.LowerTorso.Bubble
player.Character.Humanoid.WalkSpeed = 32
toggle = true
elseif toggle == true and key == "q" then
player.Character.Humanoid:UnequipTools(tool)
attachment:Destroy()
ElectroBubble:Destroy()
ElectroBubble2:Destroy()
player.Character.Humanoid.WalkSpeed = 16
toggle = false
end
end)

1 comment
'current parent: NULL' means 'current parent: NOTHING' i think