so here is the script:
local button = script.Parent.Button function steppedOn(part) local character = part.Parent local player = game.Players:GetPlayerFromCharacter(character) if player and player == script.Parent.Parent.Parent:FindFirstChild('Owner').Value then local moneyAmount = player:FindFirstChild('leaderstats'):FindFirstChild('Cash') if moneyAmount.Value >= script.Parent.Cost.Value then moneyAmount.Value = moneyAmount.Value - script.Parent.Cost.Value for i, child in ipairs(script.Parent.Target.Value:GetChildren()) do if child.ClassName == 'Part' then child.Transparency = 0 if child.Name ~= 'DropLocation' then child.CanCollide = true end end end if script.Parent.Target.Value:FindFirstChild('Activated') then script.Parent.Target.Activated.Value = true end for i, button in ipairs(script.Parent.Unlocks:GetChildren()) do button.Value.Button.Transparency = 0 button.Value.Button.CanCollide = true end script.Parent:Destroy() end end end button.Touched:Connect(steppedOn) for i, button in ipairs(script.Parent.Unlocks:GetChildren()) do button.Value.Button.Transparency = 1 button.Value.Button.CanCollide = false end
Maybe try changing the value's name inside of the button.