heres what i have
function ToolHandlerModule.PlayerParentHandler(Item, Player)
if Item.Parent.Parent ~= game.Players then
if Item.Parent.Parent.Parent == game.Players then
Player = Item.Parent.Parent
local ItemCosmetic = Item:FindFirstChild("CosmeticValue").Value
SlingHandler.SlingItem(Player, ItemCosmetic, false)
print(Player, "before")
else
if not Item.Parent.Parent:FindFirstChild("Humanoid") then
print(Player, "after")
local ItemCosmeticUn = Item:FindFirstChild("CosmeticValue").Value
SlingHandler.UnslingItem(Player, ItemCosmeticUn)
end
end
end
end
i want the player varaible from before the else statement to be saved so i can use it to send to a module but it gets reset, is there a way to get around this?