I’m a little puzzled. Because the if statement runs before the prints. But the even weirder thing here is that it’s inside an event which first runs after the child has already been put into workspace.Purchased. How come IronDropper1 is put into workspace.Purchased, the event fires, the if statement runs first & says IronDropper1 isn’t in workspace.Purchased & then first after that the prints before the if statement says IronDropper1 is indeed in workspace.Purchased.
(GA is a function to GetAttribute. Which is a string in this case.)
workspace.Purchased.ChildAdded:Connect(function(child)
local Rebirth = GA(v,'Rebirth')
print(workspace.Purchased:FindFirstChild(GA(v,'Item')))
print((workspace.Purchased:FindFirstChild(GA(v,'Item'))) == nil)
if (workspace.Purchased:FindFirstChild(GA(v,'Item'))) == nil and GA(v,'Dependency') == child.Name and Rebirth == nil or (workspace.Purchased:FindFirstChild(GA(v,'Item'))) == nil and GA(v,'Dependency') == child.Name and Rebirth <= GA(ServerStorage.Stats,'Rebirth') then
v.Head.CanCollide = true
print(v.Name..'but then its false')
local Tween = TweenService:Create(v.Head, tweenInfo, Goal2)
v.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
Tween:Play()
Tween.Completed:Wait()
v.Head.Transparency = 0
if not GA(v.Parent,'Humanoid') and not v.Head:FindFirstChild('Text') then
ButtonText(v)
end
end
end)